Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Debbie Debbie is offline
external usenet poster
 
Posts: 82
Default zip code starting with 0 to show in merged letter

when I merge zip codes starting with 0 into letters the 0 doesn't show
up...how can I get it to show?
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default zip code starting with 0 to show in merged letter

Hi Debbie,

To control the zip-code number formatting for a 5-digit zip-code 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 ZipCode};
.. edit the field so that you get {MERGEFIELD ZipCode \# 00000}
.. press F9 to update the field
.. run your mailmerge.

If you're using 5+4-digit Zip Codes, the following field code correctly formats both 5-digit and 5+4-digit Zip Code data, even where
the source data may have incorrect formatting such as a hyphen followed by trailing 0s after plain 5-digit Zip Codes (eg because a
db only accepts Zip Codes in the 5+4-digit format) or is formatted as a 5-digit or 9-digit string without hyphens. A data field
named €˜ZipCode is assumed.
{QUOTE
{SET Zip {MERGEFIELD ZipCode}}
{IF{Zip} 99999 {SET Zip {Zip \# "00000'-'0000"}}}
"{=-{=-{Zip}-Zip}/2 \# 00000;;}{=-({Zip}*(-1)-Zip)/2 \# ;-0000;}"}

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.


--
Cheers
macropod
[Microsoft MVP - Word]


"Debbie" wrote in message ...
when I merge zip codes starting with 0 into letters the 0 doesn't show
up...how can I get it to show?


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
Can't mail merge a zip code starting with a zero (02657) Dennis[_4_] Microsoft Word Help 1 February 22nd 08 04:15 AM
How to change the starting Page Number in Code Jason Koelewyn Microsoft Word Help 1 March 6th 07 02:22 PM
New fields do not show in a merged letter when using Address Block angelaoak24 Mailmerge 5 December 15th 05 05:34 PM
Zip code that starts with "0" does not show it in merged document Hisako Mailmerge 1 October 11th 05 06:58 PM
How do I make a toolbar always show up upon starting? snow_white53 Microsoft Word Help 1 September 15th 05 06:28 AM


All times are GMT +1. The time now is 06:58 AM.

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"