Mailmerge formating in MS Word

From braindump
Revision as of 20:06, 7 June 2012 by Uroesch (talk | contribs) (→‎Prerequsites)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Had a problem mailmerge under Word 2007 where I spent a long time trying to get floating numbers to display correctly. Success at last but it required a few tries.

Prerequsites

  • MS Word < 2003
  • MS Excel < 2003

Problem

Excel sends floating point numbers in various formats to Word. Sometimes as integer sometimes as a float with 10 places after the dot.

Default import in mailmerge makes a holy mess out of it and manual reformating is required.

Solution

Use numeric picture field is the solution.

  • In the mailmerger document press [Alt]+[F9] to show all the mailmerge field's values.
  • In this case we wanted two decimal points aka convert 51 to 51.00 or 32.85669835234583452 to 32.85.
This can be done by changing
{MERGEFIELD "MyNumber"}
to
{MERGEFIELD "MyNumber"\# ##0.00x}

Refernences