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

Mail Merge with Zip Codes with Leading Zeros

1 view
Skip to first unread message

Cathy Pecherkiewicz

unread,
Jun 11, 2003, 11:33:41 AM6/11/03
to
I am using a spreadsheet as the source for a mail merge.
When I complete the merge the records that have zip codes
with leading zeros (06115) do not merge correctly. They
either appear as 0, or they remove the leading zero
(6115). I have tried every cell format that I can think
of text, general, custom, zip, and have had no sucsess. I
have also tried to use the ' preceeding the zip code. I
would greatly appreciate any suggestions.

Peter Atherton

unread,
Jun 11, 2003, 12:45:58 PM6/11/03
to
Hello Cathy
The trouble with formats is that they are still numbers,
and have to be converted to text

The easiest way is to copy the data into Word and perform
a mail merge from that file. Alternatively, you can use
this code to add "'0", without the double quotes to the
numbers. Sort the data on the zip code first to only
change the data that needs it. Select the data and run the
code.

Sub InsertZero()
For Each c In Selection
c.Formula = "'0" & c.Value
Next c
End Sub

regards Peter

>.
>

Debra Dalgleish

unread,
Jun 11, 2003, 6:10:00 PM6/11/03
to
In Word, after you have inserted the Merge fields, press Alt+F9, to view
the field codes.

In the field code for the Zip Code, you can add a switch to format the
number. For example:
{ MERGEFIELD "Zip" \# "00000" }

Press Alt+F9 again to hide the field codes, then view the merged data.

Cathy Pecherkiewicz wrote:
> When I complete the merge the records that have zip codes
> with leading zeros (06115) do not merge correctly.

--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

Dave Peterson

unread,
Jun 11, 2003, 6:47:19 PM6/11/03
to
Debra Dalgleish shows a way to apply formatting in Word with merged data:

http://groups.google.com/groups?threadm=3EA9D60F.2090506%40contextures.com

(Her example is with dollars and cents, but you should be able to see what's
going on.)

--

Dave Peterson
ec3...@msn.com

0 new messages