Difference between revisions of "Word/Mailmerge formating"

From braindump
Jump to navigation Jump to search
 
Line 5: Line 5:
* MS Word < 2003
* MS Word < 2003
* MS Excel < 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 <tt>51</tt> to <tt>51.00</tt> or <tt>32.85669835234583452</tt> to <tt>32.85</tt>.
: This can be done by changing
{MERGEFIELD "MyNumber"}
: to
{MERGEFIELD "MyNumber"<span class="input">\# ##0.00x</span>}


== Refernences ==
== Refernences ==

Latest revision as of 20:06, 7 June 2012

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