Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
WC WC is offline
external usenet poster
 
Posts: 2
Default How do I maintain a numeric format when importing data from a xls

How do I maintain a numeric format when importing data from a xls
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default How do I maintain a numeric format when importing data from a xls

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 '\@ "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'. 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 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 '\@ "h:m"', as in {MERGEFIELD MyTime \@ "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" wrote in message ...
How do I maintain a numeric format when importing data from a xls


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mailmerge numeric field format Darryl Mailmerge 1 April 7th 06 06:01 AM
how do i maintain the format with mail merge SJ Mailmerge 1 November 20th 05 12:43 PM
Numeric format Scott Microsoft Word Help 4 October 16th 05 05:46 AM
I cannot maintain original format for linked data within word David Microsoft Word Help 0 July 28th 05 04:19 PM
Format a merged numeric field Hema Mailmerge 1 December 8th 04 12:51 AM


All times are GMT +1. The time now is 07:07 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"