Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

My zip code format is lost when merging from Excel to Word...

847 views
Skip to first unread message

MarianneME

unread,
Oct 18, 2004, 10:47:06 AM10/18/04
to
I am merging addresses from Excel to Work and I lose zip code formatting
during the merge so that for all zip codes that begin with a zreo, the zero
is dropped. I have never had this problem before, how can I fix this?
Thanks!

Suzanne S. Barnhill

unread,
Oct 18, 2004, 11:32:48 AM10/18/04
to
If you're using Word 2002 or 2003, see
http://homepage.swissonline.ch/cindymeister/MM2002/MM2002.htm

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"MarianneME" <Maria...@discussions.microsoft.com> wrote in message
news:A60DDDAC-A8CA-4E52...@microsoft.com...

Judy F.

unread,
Oct 22, 2004, 11:59:06 AM10/22/04
to
I am also having the same problem.
I have changed the format to special>zip code when I merge, I do not get the
initial "0" in my zip code.
I change the format to text, and when I merge I only get the "0" without the
remaining digits in the zip code.
I entered the questioning zip codes with a ' prior to the 0 and when I merge
only the "0" without the remaining digits in the zip code show up.

Help?

Graham Mayor

unread,
Oct 22, 2004, 12:40:16 PM10/22/04
to
See http://www.gmayor.com/formatting_word_fields.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org

Suzanne S. Barnhill

unread,
Oct 22, 2004, 1:12:07 PM10/22/04
to
Did you look at the recommended Web page?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Judy F." <judy...@yahoo.com> wrote in message
news:2CF72C1D-EA88-4774...@microsoft.com...

Judy F.

unread,
Oct 22, 2004, 1:41:03 PM10/22/04
to
yes I have viewed both website suggestions and followed both advice, but it
is not showing the "0"

Graham Mayor

unread,
Oct 22, 2004, 3:11:50 PM10/22/04
to
Did you update the field after adding the switch?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Merging Zip Code Errors

unread,
May 6, 2005, 2:02:02 PM5/6/05
to
I am having the same problem as Suzanne. I FOLLOWED THE POSTED DIRECTIONS!
How about a detailed example?

Graham Mayor

unread,
May 7, 2005, 2:29:47 AM5/7/05
to
The use of zip codes formatting switches is explained in detail in my web
page http://www.gmayor.com/formatting_word_fields.htm

Essentially Word is expected to provide the formatting and will strip
leading zeros from numbers. You can use a number switch or mask to restore
that zero. At the place you want the zip code press CTRL+F9. This will give
you a pair of field brackets {}

Between the brackets type the required field data, presumably {Mergefield
Zip} then add the switch i.e.
{Mergefield Zip \# "00000"}. With the cursor in the field. Press F9 to
update. This should toggle the field display, but if it doesn't ALT+F9 will.

If you need one of the more complicated formatting options, see the web
page for the content.

camell

unread,
Jul 20, 2005, 10:36:05 AM7/20/05
to

Cate

unread,
Oct 24, 2006, 1:06:02 PM10/24/06
to
I have read the entire steam, carefully read your linked page, and also
checked & double checked my typing. I continue to get an error message that
the mergefield zip \# (the backslash doesn't show, though) is not found in
the header row of my database. Everything stops at that point.
--
Cate

Suzanne S. Barnhill

unread,
Oct 24, 2006, 2:10:34 PM10/24/06
to
The "\# 00000" is a formatting switch. In the example, you must substitute
for "Zip" whatever is the name of the field in your database that contains
the ZIP code. The alternative is to link to the Excel file using DDE.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Cate" <Ca...@discussions.microsoft.com> wrote in message
news:0F21D937-05AF-4E12...@microsoft.com...

Cate

unread,
Oct 25, 2006, 9:20:02 AM10/25/06
to
Dear Suzanne & Graham,
Yes, I did actually use the heading specific to my Excel datasheet, but for
simplicity didn't include it in my last message to this stream. My system
seems to be refusing to recognize the switch. Any ideas how to trick it into
recognizing it? What is a DDE?
--
Cate

Graham Mayor

unread,
Oct 25, 2006, 9:57:23 AM10/25/06
to
Did you toggle the field to show {Mergefield Zip} rather than <<Zip>> before
adding the switch?

Did you update the field after adding the switch?
As for DDE - see the Excel data section of
http://www.gmayor.com/mail_merge_labels_with_word_xp.htm

DDE, when it works, will bring in the formatting from Excel - but it isn't
very reliable.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Cate wrote:
> Dear Suzanne & Graham,
> Yes, I did actually use the heading specific to my Excel datasheet,
> but for simplicity didn't include it in my last message to this
> stream. My system seems to be refusing to recognize the switch. Any
> ideas how to trick it into recognizing it? What is a DDE?
>

Suzanne S. Barnhill

unread,
Oct 25, 2006, 10:03:08 AM10/25/06
to
There are two ways to force Word to use the number formatting you have
applied in Excel. One is to use a formatting switch as described by Graham.
The other is to connect to Excel using DDE (the old method) instead of OLEDB
(the method introduced in Word 2002, which preserves Unicode characters but
not number formatting). To do the latter, you'll need to check the box for
"Confirm conversion at Open" on the General tab of Tools | Options. After
doing that, reattach the data source to your mail merge main document. When
you do, you'll get a dialog asking you to choose the connection method, and
you can choose DDE.

Also, I notice that Graham's reply suggests "{ Mergefield Zip \# "00000" }."
If I have correctly read Word's Help topic "Numeric Picture (\#) field
switch," the quotes around the numeric picture are unnecessary and perhaps
incorrect (and may be part of the problem).

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Cate" <Ca...@discussions.microsoft.com> wrote in message

news:03C95728-29F2-49D0...@microsoft.com...

Graham Mayor

unread,
Oct 25, 2006, 10:24:53 AM10/25/06
to
The quotes should not cause a problem!

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Suzanne S. Barnhill wrote:
> There are two ways to force Word to use the number formatting you have
> applied in Excel. One is to use a formatting switch as described by
> Graham. The other is to connect to Excel using DDE (the old method)
> instead of OLEDB (the method introduced in Word 2002, which preserves
> Unicode characters but not number formatting). To do the latter,
> you'll need to check the box for "Confirm conversion at Open" on the
> General tab of Tools | Options. After doing that, reattach the data
> source to your mail merge main document. When you do, you'll get a
> dialog asking you to choose the connection method, and you can choose
> DDE.
>
> Also, I notice that Graham's reply suggests "{ Mergefield Zip \#
> "00000" }." If I have correctly read Word's Help topic "Numeric
> Picture (\#) field switch," the quotes around the numeric picture are
> unnecessary and perhaps incorrect (and may be part of the problem).
>
>

Cate

unread,
Oct 25, 2006, 2:07:02 PM10/25/06
to
Suzanne! Removing those quotation marks seems to have done the trick with
the 5-digit zip codes!! Hurray, we're half-way there. I've tried several
variations on the 9-digit portion of the coding, but get only five zeros to
show. I can remove the 4-digit extensions, but would much rather be able to
solve this once and for all. I really appreciate all your and Graham's help,
as I'm sure others will, too.

Suzanne S. Barnhill

unread,
Oct 25, 2006, 7:33:33 PM10/25/06
to
If you have a mixture of 5-digit and 9-digit ZIPs, then you'd be better off
using DDE to connect.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Cate" <Ca...@discussions.microsoft.com> wrote in message

news:EE2087D1-AE6D-4B3D...@microsoft.com...

Graham Mayor

unread,
Oct 26, 2006, 1:21:27 AM10/26/06
to
My web page - http://www.gmayor.com/formatting_word_fields.htm shows how to
obtain 5 and 9 digit zips using switches. remember that you have to use
CTRL+F9 for each pair of field boundaries and then update the field. I don't
see why removing the quotes should make any difference (though the fields
were all tested on Word 2003). However if it works for you then remove
them -
{ IF{ Mergefield Zip } > "99999" "{ Mergefield Zip \# 00000'-'0000 }" "{
Mergefield Zip \# 00000 }" }
or if you want 9 digits for all
{ IF{ Mergefield Zip } > "99999" "{ Mergefield Zip \# 00000'-'0000 }" "{
Mergefield Zip \# 00000 }-0000" }

I have just tested this again and it works either with or without the
quotes.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Cate wrote:
> Suzanne! Removing those quotation marks seems to have done the trick
> with the 5-digit zip codes!! Hurray, we're half-way there. I've
> tried several variations on the 9-digit portion of the coding, but
> get only five zeros to show. I can remove the 4-digit extensions,
> but would much rather be able to solve this once and for all. I
> really appreciate all your and Graham's help, as I'm sure others
> will, too.
>

Roy Laws

unread,
Jul 5, 2007, 3:44:05 PM7/5/07
to
The postal code information should be stored as text in the data source, not
as a number. Enter the zipcode prefaced with a single quote.

MaggieDonuts

unread,
Aug 29, 2008, 11:37:00 PM8/29/08
to
I just purchased Microsoft Small Business with Outlook 2007 on new Dell and
I'm having the same problem, and I see it is almost 4 years later. Although
I clicked on the link that "Suzanne S. Barnhill" posted I don't see that this
solved the problem. Were you ever able to fix the problem of dropped zeros
on zip codes?

Graham Mayor

unread,
Aug 30, 2008, 12:45:38 AM8/30/08
to
The issue concerns the way Word mail merge connects to its data source,
which was changed for Word 2002 as the previous method DDE was unreliable.
Word now reads the underlying data without any formatting applied by Excel
hence leading zeros are stripped. The simplest answer is to use a formatting
switch - see the Zip code section of
http://www.gmayor.com/formatting_word_fields.htm .

Or you can revert to DDE albeit with the inherent risk that DDE is
unreliable, the method linked from that page.


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Wordwonderor

unread,
Jun 4, 2009, 6:22:01 PM6/4/09
to
I could not figure this out even after reading deeply into the cited web
page. I was doing a mail merge from excel to a word label wizard. I couldn't
figure out where to insert the code. In excel, in the word data file, or one
of the labels. But the label seemed the only option. The wizard called the
field Postal when I toggled it (I had to expand my label size to see it),
although the Excel file called it Zip. I did my best at entering the code in
brackets before and after postal. I deleted postal and typed in {mergefield
zip \ # "00000"} but that didn't work. I was hampered by the fact no example
was given for formatting zip (only numbers and currency) and nothing for
labels. After many failed attempts, I follwwed the DDE instructions adding an
Insert Field Icon to my Label tool bar. Inserted the zip field with the code
after Country, and deleted Postal. This worked. I than propogated the field.
Few. I can't believe Microsoft made this process so cumbersome and has not
provided a fix. I am thinking Apple for my next purchase.

MaggieDonuts

unread,
Jun 4, 2009, 7:13:01 PM6/4/09
to
I simply gave up trying to use Small Business and went back to my old
computer, hoping the mother board doesn't die on me, and continued to print
postcards with addresses directly from that computer. However, an associate
has figured out how publisher can print each of 1200 addresses on the
postcards I send. I also have a business "Market Advantage" program from my
company that allows me to maintain business contacts and notes. So I figured
Microsoft's Small Business Contact Manager was just not worth my time. If
you haven't figured out already, I'm not a computer genius, but I do manage
okay.

Graham Mayor

unread,
Jun 5, 2009, 12:11:51 AM6/5/09
to
There is no 'fix' because it isn't broken. What you see is by design.
The DDE method of connection to the data was changed at Word 2002 because
DDE is somewhat unreliable in operation and the chosen alternative inserts
only the raw data. If DDE will work for you then fine, but if you want more
information about field switches see
http://www.gmayor.com/formatting_word_fields.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

L Middleton@discussions.microsoft.com Diana L Middleton

unread,
Oct 20, 2009, 4:46:43 PM10/20/09
to
The DDE method worked well. I had trouble merging zip codes w/ 9 digits and a
hyphen, but this solved the problem.

Veteran Mortgage

unread,
May 26, 2021, 4:31:31 PM5/26/21
to
This is true its text it has to be to read in Word
0 new messages