Mailmerge zip code problem

S

SamFortMyers

9-digit zip codes merge as single zero (while 5-digit codes merge
successfully). I've tried formatting field to text, even reducing original
9-digit codes to 5 digits, but nothing seems to work.
 
C

Carole

I'm having the exact same problem. I went to this web
site, but have no idea what the information means or is
telling me to do. I have worked with mail merges for
years but have never had to customize anything like this.
Why doesn't word just bring the right numbers over as it
has always done in the past?
 
D

Doug Robbins

This is the relevant part of the site. You must toggle on the field codes
(Alt+F9) and add a formatting switch to force the display into the required
format.

US Zip Codes
Five digit zip codes are reported as dropping the leading zero when merging
from Excel/Access data files. A simple numeric switch should fix that one

{ MERGEFIELD Zip \# "00000" }

Formatting problem: the zip codes in my data source are 5-digit or 9-digit.
What I'd like to do is apply a number format that will convert all ZIP codes
to ZIP + four format, i.e. 12345 becomes 12345-0000, 123450000 becomes
12345-0000 and 123456789 becomes 12345-6789
This requires the use of a conditional field which tests whether the field
has five or nine digits then applies appropriate formats.

{ IF { MERGEFIELD Zip } > "99999" "{ MERGEFIELD Zip \# "00000'-'0000" }"
"{ MERGEFIELD Zip \# "00000" }-0000" }

Zip = 12345

12345-0000

Zip = 123456789

12345-6789


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
C

Carole

I will give this a try. With some files, though, Word is
changing the zero-leading zips -- as well as all nine-
digit codes -- to "0" only (not simply dropping the
leading "0"). I'm not sure that this is the same issue.

Either way, my bigger question is why is this now
necessary? I've never had to customize merge fields
before. Isn't there a way just to tell Word to bring in
the data exactly as it appears in Excel?
 
D

Doug Robbins

In Tools>Options>General, check the "Confirm conversions at Open" box and
try the different connection methods that are presented when you attach the
datasource to the mailmerge main document. Connecting via DDE might be what
you are after.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top