Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formating Mail Merged numbers 3

Status
Not open for further replies.

Gavona

Technical User
Aug 27, 2002
1,771
GB
I am constructing a mail merge using Word 2010 to construct an (HTML) email. The mail includes a table containing merged fields. How can I format the numbers to 2 decimal places and with thousands separators? Can Word do this or must I change numbers to formatted text in my source table.

In case it helps, the source for the data is a pivot table in an excel workbook (or in fact a named range covering the relevant area of the pivot table).

Many thanks,

Gavin

Gavin
 
For space as thousands separator and standard dot (.) decimal separator:
{ MERGEFIELD FieldName \# #\ ##0.00}
For comma as thousands separator use "," instead of "\ ".

combo
 
Thanks Combo. I got divertedto something else but will get back to this next week :)

Gavin
 
The correct numeric formatting switch would be something like:
{MERGEFIELD FieldName \# ",0.00"}
Combo's approach would only be needed if you require a space for the thousands separator AND you're prepared to have numbers less that 1000 padded out.

For more, see Mailmerge Number & Currency Formatting in the Mailmerge Tips and Tricks thread at:
or:

Cheers
Paul Edstein
[MS MVP - Word]
 
Thanks Paul, Whilst I was able to figure the format codes, those links deserve more than one star!

I have got it all working.

Gavin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top