Difference between revisions of "Word/Mailmerge formating"

From braindump
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE: Mailmerge formating in MS Word}} Had a problem mailmerge under Word 2007 where I spent a long time trying to get floating numbers to display correctly. Success at...")
 
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
== Prerequsites ==
== Prerequsites ==
* MS Word < 2003
* 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 <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 ==
* [ http://office.microsoft.com/en-us/word-help/numeric-picture-field-switch-HP005186226.aspx Numeric Picture (\#) field switch]
* [http://office.microsoft.com/en-us/word-help/numeric-picture-field-switch-HP005186226.aspx Numeric Picture (\#) field switch]
* [http://wordprocessing.about.com/od/usingmailmerge/qt/NPFSwitch.htm Changing How Word Displays Numbers in Mail Merge]
* [http://wordprocessing.about.com/od/usingmailmerge/qt/NPFSwitch.htm Changing How Word Displays Numbers in Mail Merge]
[[Category: Windows]]
[[Category: Windows]]

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