Hi WC,
Using a DDE connection usually does the trick. If that isn't sufficient, you can add formatting switches to the mergefields.
For example -
Mailmerge Number Formatting: .. select the field; .. press Ctrl-F9 to reveal the field coding. It should look something like {MERGEFIELD MyData}; .. edit the field so that you get {MERGEFIELD MyData \# $,0.00;($,0.00)}; .. position the cursor anywhere in this field and press F9 to update it; .. run your mailmerge. The precision of the displayed value is controilled by the '0.00'. You can use anything from '0' to '0.000000000000000'.
If you add a final ';' to the formatting switch (eg \# $,0.00;($,0.00);) any zero values will be suppressed, whether resulting from empty fields or from fields containing 0s.
Mailmerge Percentage Formatting: .. select your mergefield, which will look something like «Percent»; .. press Ctrl-F9 to wrap another field around it, thus - { «Percent» }; .. edit the field so that you get {=«Percent»*100 \# 0.00%}; .. position the cursor anywhere in this field and press F9 to update it; .. run your mailmerge. The precision of the displayed value is controilled by the '0.00'. You can use anything from '0' to '0.000000000000000'.
Mailmerge Phone Number Formatting: .. select the mergefield; .. press Shift-F9 to expose the field coding. It should look something like {MERGEFIELD MyData}, where 'MyData' is your data field's name; .. delete everything between 'MyData' and the closing field brace; .. add ' \# "(000) 0000 0000"' after 'MyData', so that you end up with {MERGEFIELD MyData \# "(000) 0000 0000"}; .. position the cursor anywhere in this field and press F9 to update it; .. run your mailmerge.
Mailmerge Date Formatting: .. 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 '\[ at ] "d MMMM yyyy"' to the field, as in {MERGEFIELD MyDate \[ at ] "d MMMM yyyy"}. With this switch your date will come out as '2 August 2008'. Other possible date formatting switches include: . \[ at ] "dddd, d MMMM yyyy"; . \[ at ] "ddd, d MMMM yyyy"; . \[ at ] "d MMM yyyy"; . \[ at ] "dd/MMM/yyyy"; . \[ at ] "d-MM-yy"; Note: you can use the D, M & Y expressions in any order you like, but you must use uppercase 'M's for months. .. position the cursor anywhere in this field and press F9 to update it; .. run your mailmerge.
Mailmerge Time Formatting: .. select the mergefield; .. press Shift-F9 to expose the field coding. It should look something like {MERGEFIELD MyTime} where 'MyTime' is your mergefield's name; .. delete anything appearing after the mergefield's name and add '\[ at ] "h:m"', as in {MERGEFIELD MyTime \[ at ] "h:m am/pm"}. Note: you must use lowercase 'm's for minutes; .. if you want the hours and/or minutes to display leading 0s, change 'h' to 'hh for hours and 'm' to 'mm' for minutes; .. position the cursor anywhere in this field and press F9 to update it; .. run your mailmerge.
-- Cheers macropod [MVP - Microsoft Word]
"WC" <WC[ at ]discussions.microsoft.com> wrote in message news:8C1BB0F8-4BBA-43C6-9894-87425C5B9B17[ at ]microsoft.com...
[Quoted Text] > How do I maintain a numeric format when importing data from a xls
|