Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / General MS Word Questions / December 2007

Tip: Looking for answers? Try searching our database.

Zip+4 postal codes don't work in mail merge

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Orrie - 28 Dec 2007 08:06 GMT
Hi,
The answer to this question may lie in Excel rather than Word, but, here
goes...

I do a monthly mail merge using Word 2003 and a membership database in Excel
2003. Recently, we've been getting several new records each month that use
the U.S. Postal Service zip+4 postal codes that look like this: 12345-4321.
When those records are merged, the postal codes appear as 0, and I have to
go back and type them in manually on each letter.

How can I make the zip+4 postal codes appear as they should in the merge? Is
this a problem with Word? Or is the problem that Excel sees the zip+4 format
as an arithmetical formula? If so, how can I make the merge setup see it as
a postal code, that is as "text"? I've been using Word for years, but am new
to Excel.

Thank you for your help.

Orrie
Peter Jamieson - 28 Dec 2007 10:18 GMT
1. The likely solution to this is to check Word
Tools->Options->General->Confirm conversion at open, go through the process
of connecting to your workbook again, and select the DDE option when it is
offered. This will only work if the data is in the first worksheet in the
workbook.

2. The basic problem is that Excel decides a format for each cell in a
column (e.g. numeric, text, date) based on what you enter, but the mechanism
that Word 2003 uses by default to get the data (in this case, an OLE DB
Provider) wants to decide a format for an entire column. When you enter
5-digit ZIP codes, Excel will typically treat them as "numbers", whereas
when you enter 9-digit ZIP codes, Excel will see the "-" and treat them as
text. So you then have a mixture of text and numbers in the same column.
When the OLE DB provider looks at the column, by default it decides the data
type on the basis of what is in the first 8 rows. For example, if all the
first 8 ZIP codes are 5-digit ones, the provider treats the whole column as
numeric. So what does it do with the 9-digit ones, which are in text format?
It treats them as the number 0. However, if the first 8 rows have 9-digit
ZIPs, the provider decides that the column is text, and will convert the
5-digit numeric values to text, more or less as you see them (it won't
however retain any leading zeroes).

3. You can get around this by switching the way Word connects to Excel to
DDE (as above). Or you can try to ensure that the first 8 rows always have
9-digit ZIPs.

4. This is all complicated by the fact that in Excel, you can format your
cells as having either 5-digit or 9-digit ZIP format. In this case, you only
enter the 5 or nine digits, or the 9 digits without the "-". Excel stores
the value as a number, but applies a format when it displays the number. But
the OLE DB provider then sees the whole column as numbers and returns either
a 5-digit or 9-digit number. The 9-digit number does not have a "-" so you
then need to use "formatting switches" in the fields in Word to insert one -
see Graham Mayor's page at

http://www.gmayor.com/formatting_word_fields.htm

5. If your eyes didn't already glaze over in point (1), there is more about
this at

http://tips.pjmsn.me.uk/t0003.htm

I wish it were simpler but there you go.
Signature

Peter Jamieson
http://tips.pjmsn.me.uk

> Hi,
> The answer to this question may lie in Excel rather than Word, but, here
[quoted text clipped - 15 lines]
>
> Orrie
Orrie - 28 Dec 2007 19:06 GMT
Thank you, Peter. It worked!

In case anyone else refers to this thread, and has their eyes "glaze over"
at what seems to be a complicated procedure, I can assure them that actually
implementing the solution was quick and easy, even for a non-techy (me.)
Just follow Peter's Step 1.

Orrie

> 1. The likely solution to this is to check Word
> Tools->Options->General->Confirm conversion at open, go through the
[quoted text clipped - 58 lines]
>>
>> Orrie
Peter Jamieson - 29 Dec 2007 16:24 GMT
BTW this problem has been around for some time and was also raised again
recently in the www.public.word.mailmerge.fields group (or "Mailmerge and
Fax" group, I suspect Microsoft still calls it). So I tried to get to the
bottom of it as best I could and you may find the recent discussion there
useful.

Signature

Peter Jamieson
http://tips.pjmsn.me.uk

> Thank you, Peter. It worked!
>
[quoted text clipped - 68 lines]
>>>
>>> Orrie
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.