Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2024, 01:43 PM
scribbled scribbled is offline MailMerge field for decimals with letters, i.e. 1A.23 Windows 10 MailMerge field for decimals with letters, i.e. 1A.23 Office 2021
Novice
MailMerge field for decimals with letters, i.e. 1A.23
 
Join Date: Jun 2024
Posts: 3
scribbled is on a distinguished road
Unhappy MailMerge field for decimals with letters, i.e. 1A.23

I have two format possibilities for data in an Excel column: ##.##, or #*.## (i.e. 1.23 or 4A.56).



If the mergefield is used with no switches then 4A.56 shows as expected, but 1.23 will show with repeating decimals (1.2222222222223). If I use the \# 0.00 switch then 1.23 shows as expected, but the letter is stripped out of 4A.56 (4.56, I also tried \# 00.00).

The core of the issue appears to be that the column is formatted as General in Excel. When I switch that to Text and reload the data source the mergefield with no switches shows both values as expected. The problem is that I cannot change the Excel data source for practical use. This file is being generated by a third-party application that exports the column as General and the datasource is overwritten every time.

Another wrinkle is that this only happens on Windows, which is also the only OS the application is available on. When I load the mail merge doc and the data source on my Mac, it shows both values as expected with no changes to either file.

After hours of playing around, googling, and trying different things, I'm assuming this is just not possible, but I wanted to exhaust all resources before moving on. I haven't gotten it to work using DDE, but it's a pretty janky solution, and I would love for this to be fixable in the document itself.

I've attached a copy of the document and data source. The fields are ItemNumber and SubLocation.

Any insight would be greatly appreciated.

Thanks
Attached Files
File Type: doc MailDoc.doc (32.7 KB, 3 views)
File Type: xlsx Datasource.xlsx (10.9 KB, 4 views)
Reply With Quote
  #2  
Old 06-27-2024, 06:59 PM
Guessed's Avatar
Guessed Guessed is offline MailMerge field for decimals with letters, i.e. 1A.23 Windows 10 MailMerge field for decimals with letters, i.e. 1A.23 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Looking at what you provided, it appears that you could compare SubLocation against a formatted ItemNumber. Do you have a larger data set which includes rounded numbers for us to test on?

I did have a fiddle with the one entry and you might be able to try something along the lines of testing formatted vs unformatted eg
{If {MERGEFIELD ItemNumber \# ##.##} = {MERGEFIELD ItemNumber } {MERGEFIELD ItemNumber } {MERGEFIELD ItemNumber \# ##.##}}
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 06-27-2024, 07:09 PM
scribbled scribbled is offline MailMerge field for decimals with letters, i.e. 1A.23 Windows 10 MailMerge field for decimals with letters, i.e. 1A.23 Office 2021
Novice
MailMerge field for decimals with letters, i.e. 1A.23
 
Join Date: Jun 2024
Posts: 3
scribbled is on a distinguished road
Default

Thanks so much for the reply. I will play around with this in the morning.

As far as an extended data set goes, ItemVolume and ItemIssue will likely always have values with both letters and numbers, but I think that's it. To expand a bit, I included values in both ItemNumber and SubLocation just as examples of what the two formats would look like. The numbers themself would only ever be in the SubLocation of the export.
Reply With Quote
  #4  
Old 06-28-2024, 06:42 AM
scribbled scribbled is offline MailMerge field for decimals with letters, i.e. 1A.23 Windows 10 MailMerge field for decimals with letters, i.e. 1A.23 Office 2021
Novice
MailMerge field for decimals with letters, i.e. 1A.23
 
Join Date: Jun 2024
Posts: 3
scribbled is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
I did have a fiddle with the one entry and you might be able to try something along the lines of testing formatted vs unformatted eg
{If {MERGEFIELD ItemNumber \# ##.##} = {MERGEFIELD ItemNumber } {MERGEFIELD ItemNumber } {MERGEFIELD ItemNumber \# ##.##}}
So, this actually did work, thank you so much for taking the time. Unfortunately, while it does work when I'm manually opening Word and selecting the data source, for some reason it still doesn't work when Word is using a freshly generated data source from the application.

Oh well, I think it's time to move on.

Thanks again
Reply With Quote
Reply

Tags
mailmerge



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ref field to Database field doesn't update properly in Mailmerge huynguyen865 Mail Merge 1 08-30-2021 07:30 AM
MailMerge field for decimals with letters, i.e. 1A.23 Macro to insert an image to a word mailmerge document based on the value of a mailmerge field? Jake93 Mail Merge 3 07-02-2019 05:38 PM
Mailmerge field format? Rothera85 Mail Merge 9 05-11-2014 03:41 PM
Words & letters half burried in a Text field in a table. Ed54 Word 4 01-05-2012 04:10 PM
mailmerge with letters of a different numbers of pages roel1972 Mail Merge 0 02-21-2011 11:45 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft