Mail Merge formating zip code

M

matt

I am working on a Mail Merge where the data source originates from a different data base. and is imported into excel. If I do the Mail Merge from word. I believe it looks for the original formatting from the data that was shipped and therefore defaults to 7754 rather than 07754 taken from the cell format in excel.

Is there an easy fix for what I am trying to due, or should I Alt+F9 and format it for a Zip code. I will also need to know what that is.

Thanks

Matt
 
D

Doug Robbins - Word MVP

Hi Matt,

You can use a query in the database to format it, or in the mailmerge
maindocument, put the mergefield inside the following field construction

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

That will handle both 5 and 9 digit zipcodes, appending a -0000 to the 5
digit ones.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
I am working on a Mail Merge where the data source originates from a
different data base. and is imported into excel. If I do the Mail Merge from
word. I believe it looks for the original formatting from the data that was
shipped and therefore defaults to 7754 rather than 07754 taken from the
cell format in excel.

Is there an easy fix for what I am trying to due, or should I Alt+F9 and
format it for a Zip code. I will also need to know what that is.

Thanks

Matt
 

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