View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Postal Codes in Word/Excel merge

Hi Joyce,

In your Word document, you need to add some logic for processing the zip codes. A suitable field coding for this is:
{QUOTE{SET Val {MERGEFIELD ZipCode}}{IF{Val} 99999 {SET Val {Val \# "00000'-'0000"}}}{=-{=-{Val}-Val}/2 \#
00000;;}{=-({Val}*(-1)-Val)/2 \# ;-0000;}}
where 'ZipCode' is the name of your Zip Code mergefield.

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
[MVP - Microsoft Word]


"joyced" wrote in message ...
I have an Excel document that has 5 digit and 9 digit zip codes. How do I
get the 9 digit zip codes to show in the "Postal Code" merge field? The only
thing that shows when I try to merge into Word is a "0." Thank you.