![]() |
|
#1
|
||||
|
||||
![]() Quote:
Mailmerge Number & Currency Formatting To control number & currency formatting in Word, add a numeric picture switch to the mergefield. To do this: • select the field; • press Shift-F9 to reveal the field coding. It should look something like {MERGEFIELD MyData}; • edit the field so that you get {MERGEFIELD MyData \# $,0.00} (or whatever other numeric format you prefer - see below); • position the cursor anywhere in this field and press F9 to update it; • run your mailmerge. Note1: The '\# $,0.00' in the field is referred to as a numeric picture switch. Other possibilities include: • \# 0 for rounded whole numbers • \# ,0 for rounded whole numbers with a thousands separator • \# ,0.00 for numbers accurate to two decimal places, with a thousands separator • \# $,0 for rounded whole dollars with a thousands separator • \# "$,0.00;($,0.00);'-'" for currency, with brackets around negative numbers and a hyphen for 0 values The precision of the displayed value is controlled by the '0.00'. You can use anything from '0' to '0.000000000000000'. If you use a final ';' in the formatting switch with nothing following, (eg \# "$,0.00;($,0.00);") zero values will be suppressed. Note that this suppresses 0s resulting from empty fields and from fields containing 0s. Note2: If you use a decimal tab or right-aligned tab to align the values and insert a tab into the field code after the $ sign, you can have the values aligned accordingly. Mailmerge Date Formatting To get the date format you want, you can add a formatting picture switch as follows: • select the mergefield; • press Shift-F9 to expose the field coding. It should look something like {MERGEFIELD MyDate} where 'MyDate' is your mergefield's name; • delete anything appearing after the mergefield's name and add '\@ "d MMMM yyyy"' to the field, as in {MERGEFIELD MyDate \@ "d MMMM yyyy"}. With this switch your date will come out as '2 August 2008'. • position the cursor anywhere in this field and press F9 to update it; • run your mailmerge. Other possible date formatting switches include: . \@ "dddd, d MMMM yyyy"; . \@ "ddd, d MMMM yyyy"; . \@ "d MMM yyyy"; . \@ "dd/MMM/yyyy"; . \@ "d-MM-yy". Note: You can swap the d, M, y expressions around, but you must use uppercase 'M's for months - lowercase 'm's are for minutes. PS: The data export to the text file may be the cause of the unwanted spaces referred to in your previous posts.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
![]()
Hi Paul,
Thanks for your help. You have helped me solve two of the more obscure formatting issues. I appreciate the input. |
![]() |
Tags |
mailmerge, yes/no |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Merge Word documents using a mailmerge field | Concertina | Mail Merge | 3 | 02-18-2013 04:12 AM |
![]() |
Baldeagle | Mail Merge | 8 | 02-11-2013 04:40 AM |
![]() |
Baldeagle | Mail Merge | 13 | 05-29-2012 02:04 PM |
Formula to subtract one month from due date field in reminder field | ghumdinger | Outlook | 1 | 10-01-2011 12:09 AM |
![]() |
Caroline | Mail Merge | 5 | 04-11-2011 04:17 PM |