Nine digit zip codes in labels

I am creating/printing mailing labels using Office Word 2013 and an Excel 97-2003 file as my data source and Windows 7 is my operating system.  Everything works perfectly except for my zip codes.  Some of my people in the list have the new nine (9) digit zip codes.  Each name with this format zip code has a zero (0) merged for its zip code on the label.  All five (5) digit zip codes merge properly.  Does the template coded for labels only allow five (5) characters for a zip code?

Examples:  Anytown, USA 27543            Merges properly

                Anytown, USA  27543-2345   Merges as a zero (0)

Any help would be appreciated.  Thank you.

Answer
Answer

The subject is dealt with in the article "Formatting Word fields with switches" on fellow MVP Graham Mayor's website at:

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

Hope this helps,
Doug Robbins - MVP Office Apps & Services (Word)
dougrobbinsmvp@gmail.com
It's time to replace ‘Diversity, Equity & Inclusion’ with ‘Excellence, Opportunity & Civility’ - V Ramaswamy

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Answer
Answer

The following field code correctly formats 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 in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practicable to add them via any of the standard Word dialogues.

Cheers
Paul Edstein
(Fmr MS MVP - Word)

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated May 2, 2022 Views 1,129 Applies to: