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 / Mailmerge and Fax / June 2004

Tip: Looking for answers? Try searching our database.

Canada Postal Codes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David BallQuenneville - 03 Jun 2004 15:55 GMT
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 - 03 Jun 2004 16:01 GMT
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?

> I am merging to a word document using MS Query from a 3rd party application
> whose data is in MS SQL 2000.
[quoted text clipped - 7 lines]
>
> David
Doug Robbins - Word MVP - 03 Jun 2004 23:37 GMT
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

Signature

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 merging to a word document using MS Query from a 3rd party application
> whose data is in MS SQL 2000.
[quoted text clipped - 7 lines]
>
> David
 
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.