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

Canada Postal Codes

0 views
Skip to first unread message

David BallQuenneville

unread,
Jun 3, 2004, 10:55:23 AM6/3/04
to
I am merging to a word document using MS Query from a 3rd party application
whose data is in MS SQL 2000.

With in their database is setup as a Zip Code not Canadian Postal Codes
(123456 instead of M1N 2B7.) Therefore the code comes out as all 6
characters together not 3 space 3. Is there a way to format the merge field
as I can change the vendors format?

Thanks

David


David BallQuenneville

unread,
Jun 3, 2004, 11:01:12 AM6/3/04
to
Ooops I screwed up I mean to say "Is there a way to format the merge field
as I can't change the vendors format?

"David BallQuenneville" <in...@idealingprinting.com> wrote in message
news:eFMSLrXS...@TK2MSFTNGP09.phx.gbl...

Doug Robbins - Word MVP

unread,
Jun 3, 2004, 6:37:46 PM6/3/04
to
Hi David,

If Canadian Postal Codes are always of the format character number character
number character number, then you could use a Wildcard Edit Replace routine
on the documnet created by the mail merge with

([A-Z]{1}[0-9]{1}[A-Z]{1})([0-9]{1}[A-Z]{1}[0-9]{1})

in the "Find what:" control and

\1 \2\

in the "Replace with:" control to insert the space. (Note there is a space
between the 1 and the \)

For an explanation, see the article “Finding and replacing characters using
wildcards” at:

http://word.mvps.org/FAQs/General/UsingWildcards.htm


--
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


"David BallQuenneville" <in...@idealingprinting.com> wrote in message
news:eFMSLrXS...@TK2MSFTNGP09.phx.gbl...

0 new messages