View Single Post
 
Old 10-23-2013, 04:52 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

A mergefield coded as {Mergefield InterestRate \# 0.0000} will show the data to 4 decimal places. If you're dealing with percentage data, though, you may need to multiply the values by 100 to get the results you're after.

To control the percentage formatting in Word, rather than at the data source, add a formula and numeric picture switch to the mergefield, as follows:
• select your mergefield, which will look something like «InterestRate»;
• press Ctrl-F9 to wrap another field around it, thus { «InterestRate» };
• edit the field so that you get {=«InterestRate»*100 \# 0.00%};
• position the cursor anywhere in this field and press F9 to update it;
• run your mailmerge.

Note1: the precision of the displayed value is controlled by the '0.00'. You can use anything from '0' to '0.000000000000000'.

Note2: The field brace pairs (ie '{ }') for the above example are created in the body of the document via Ctrl-F9 (Cmd-F9 on a Mac) - you can't simply type them or copy & paste them from this message. Likewise, you can't type or copy & paste the chevrons (ie '« »') - they're part of the actual mergefields, which you can insert from the mailmerge toolbar.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote