Home |
Search |
Today's Posts |
#8
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
leading zeros in mail merge
Peter - I printed your answer
and Macropod - I've printed out the link you sent. Thanks for the information we have to try these. "macropod" wrote: Hi dp, 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] "dp" wrote in message ... Using 2007 Excel and 2007 Word A co-worker has a name/addr file in Excel and formatted the zip column as category, special 00000. Zip shows fine. However when uses word mail merge to produce mailing labels, the leading zeros are dropped. What need to be done? TIA . |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why do zip codes w/ leading zeros disappear when doing mail merge | Mailmerge | |||
how do i display leading zeros when mail merge to Word doc | Mailmerge | |||
Mail Merge drops leading zeros from Access text field zips? | Mailmerge | |||
dropping leading zeros in mail merge | Mailmerge | |||
Mail Merge Dropping leading zeros | Mailmerge |