Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
joyceD joyceD is offline
external usenet poster
 
Posts: 3
Default Postal Codes in Word/Excel merge

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.
  #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.


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
Postal Codes in Word 2007 Soquelatty Microsoft Word Help 1 November 20th 07 12:58 AM
preceeding zeros in postal codes of mail merge Crystal B Mailmerge 2 November 23rd 05 11:56 PM
how to use postal codes on a mail merge Scott972 Mailmerge 1 July 19th 05 04:00 AM
Mail Merge some international postal codes displayed as "0" cmcintyre Mailmerge 0 April 18th 05 11:35 PM
postal bar codes in mail merge labels Rachelle New Users 7 April 3rd 05 08:35 AM


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