Hello all!
I am putting together a template using mail merge. This is the first time that I have made extensive use of the mail merge feature, so I am still learning how to format the fields.
The source is an Excel spreadsheet. In the sheet, there are a number of fields where the input data type can vary. Example: in the field "DoctorOfficeUS" the user can input the following values:
Standard Coinsurance (after deductible)
Standard Coinsurance (deductible waived)
100%
90%
80%
If I insert the field into the Word document with no formatting, it shows the text values correctly but displays the percentages as decimals, such as
0.9000000000000000
If I use switches to format the percentages, the percentages display correctly, but a syntax error is generated if the field contains one of the text options:
{ ={MERGEFIELD "DoctorOfficeUS" } *100 # "##0%" }
Is there a way to determine the data type and then format it appropriately? I am thinking that some sort of "If" statement might work. How would I determine if the input is numeric or text? Changing the input Excel file is not really an option since this file
is in use by numerous salespeople in the field, and we have lots of existing data that needs to be imported into the template that I am creating.
Help?