Link to home
Start Free TrialLog in
Avatar of runnuger
runnuger

asked on

MS Word 2007 Mail Merge number formatting avoiding scientific notation.

Hi EE,

I have set-up a Word 2007 mail merge of data stored in a Access 2007 DB that has been populated from a Excel 2007 spreadsheet.  Several columns in the excel spreadsheet have a persistent formatting issue that makes the values in these columns appear as scientific notation on the mail merge.  I have tried reformatting the spreadsheet to text, tried pasting just values into a new sheet and I have saved the spreadsheet as tab delimited text file and then imported into Access but the numerical formatting persists in the access db and then onto the mail merge.  Some cells in these columns have text which is not imported into access with the numerical data.  It is quite unusual since other columns containing similar data behave normally as import text.  I have also tried field switching on the mail merge end but there is such variance in the numbers that the formatting looks strange (26.00000 vs 0.00045).  Will I need a complicated field switch using IF statements to determine what decimal place I need to format to and then display that number of digits?

Thanks, Runnuger
Avatar of MSmax
MSmax
Flag of United Kingdom of Great Britain and Northern Ireland image

Can you please post sample spreadsheet with affected cells?
Avatar of GrahamSkan
Have you tried using numerical formatting switch on the mail merge field?

Use Alt+F9 to switch to field code display. E.g. from

<<MyNumber>>

to { MERGEFIELD MyNumber }

and then add the switch such as \# #,##0.00 to get

{ MERGEFIELD MyNumber  \# "#,##0.00" }

You can toggle back to the field results view by reusing Alt+F9
Avatar of runnuger
runnuger

ASKER


Hi,

I have uploaded a sample spreadsheet.  In this case Columns H and Z have the formatting I cannot remove.  When the data is imported into Access the Not Detected entries are removed and I get the scientific notation problems when I do the mail merge.  All other columns are fine. I have tried the numerical formatting switch to force the formatting but there is such variance in the numbers that the formatting looks strange (26.00000 vs 0.00045).  Will I need a complicated field switch using IF statements to determine what decimal place I need to format to and then display that number of digits?

Thanks, Runnuger
Import.xls
Before I look at the file, I should warn you that Word Fields are very limited in their programattic power and that determining the number of decimal places is almost certainly not possible
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial