#1   Report Post  
Posted to microsoft.public.word.docmanagement
Steve C[_2_] Steve C[_2_] is offline
external usenet poster
 
Posts: 4
Default Mail Merge Switch

Hello,
I'm using the following switch for numeric fields in my mail merge, but i
also need one for currency ($) & percentages (%). Are there switches for
these as well?

{MERGEFIELD "field" \# 0.00 }.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Mail Merge Switch

Hi Steve,

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.

Note: 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.

To control percentage formatting in Word, you need to add a formula and numeric picture switch to the mergefield. To do this:
.. 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.

When you're done, run your mailmerge.

--
Cheers
macropod
[Microsoft MVP - Word]


"Steve C" wrote in message ...
Hello,
I'm using the following switch for numeric fields in my mail merge, but i
also need one for currency ($) & percentages (%). Are there switches for
these as well?

{MERGEFIELD "field" \# 0.00 }.


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Steve C[_2_] Steve C[_2_] is offline
external usenet poster
 
Posts: 4
Default Mail Merge Switch

Perfect. Much Thanks!

"macropod" wrote:

Hi Steve,

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.

Note: 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.

To control percentage formatting in Word, you need to add a formula and numeric picture switch to the mergefield. To do this:
.. 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.

When you're done, run your mailmerge.

--
Cheers
macropod
[Microsoft MVP - Word]


"Steve C" wrote in message ...
Hello,
I'm using the following switch for numeric fields in my mail merge, but i
also need one for currency ($) & percentages (%). Are there switches for
these as well?

{MERGEFIELD "field" \# 0.00 }.



  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Mail Merge Switch

See also http://www.gmayor.com/formatting_word_fields.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Steve C wrote:
Perfect. Much Thanks!

"macropod" wrote:

Hi Steve,

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.

Note: 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.

To control percentage formatting in Word, you need to add a formula
and numeric picture switch to the mergefield. To do this: .. 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.

When you're done, run your mailmerge.

--
Cheers
macropod
[Microsoft MVP - Word]


"Steve C" wrote in message
...
Hello,
I'm using the following switch for numeric fields in my mail merge,
but i also need one for currency ($) & percentages (%). Are there
switches for these as well?

{MERGEFIELD "field" \# 0.00 }.



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
Mail Merge Field - Font Switch? Derek Hart Mailmerge 2 October 15th 07 11:03 PM
Mail Merge Switch PFLY Mailmerge 1 July 25th 06 12:54 AM
Problem with numeric picture switch in mail merge Art Mailmerge 2 May 4th 06 05:46 AM
Mail Merge Date Switch Problems HilsM Mailmerge 1 June 3rd 05 02:56 PM
Switch an image dynamically based on mail merge field - possible? Chris Hlusak Mailmerge 1 January 24th 05 11:11 PM


All times are GMT +1. The time now is 08:04 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"