Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
B.A.D. B.A.D. is offline
external usenet poster
 
Posts: 1
Default Zipcode Errors with Mailmerge

Why does mailmerge remove the first zero from the zipcode area of the address
line? It is definitely not the source formatting, but for some reason it
always takes it out and I do not know how to fix it! I am pulling my
information from an Excel sheet so I do not think it is software
compatability issues. Can anyone help???
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Zipcode Errors with Mailmerge

See "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 - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.

"B.A.D." wrote in message
...
Why does mailmerge remove the first zero from the zipcode area of the
address
line? It is definitely not the source formatting, but for some reason it
always takes it out and I do not know how to fix it! I am pulling my
information from an Excel sheet so I do not think it is software
compatability issues. Can anyone help???


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Zipcode Errors with Mailmerge

Hi B.A.D,

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 via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.

--
Cheers
macropod
[Microsoft MVP - Word]


"B.A.D." wrote in message ...
Why does mailmerge remove the first zero from the zipcode area of the address
line? It is definitely not the source formatting, but for some reason it
always takes it out and I do not know how to fix it! I am pulling my
information from an Excel sheet so I do not think it is software
compatability issues. Can anyone help???


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
Mailmerge Errors Rydia Mailmerge 2 June 9th 22 10:34 AM
Zipcode Invalid with bulk mailmerge hbean Mailmerge 0 February 9th 09 08:47 PM
Mailmerge Errors with Office 2003 Franklnc Mailmerge 7 January 5th 06 07:34 AM
zipcode problem with mailmerge using excel. pamsf Mailmerge 1 May 10th 05 04:46 PM
Outlook -> Word Mailmerge defaults question - Zipcode missing from Addressblock Michael Krause Mailmerge 3 December 4th 04 12:24 AM


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