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 / April 2004

Tip: Looking for answers? Try searching our database.

Bar codes in an IF/THEN statement in Mail Merge

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jackie Mulholland - 31 Mar 2004 21:46 GMT
I have an ODBC connection to a database on another
server.  In this database I have 2 fields for the
zip code (ZIP and ZIP4) and 1 for the country.  The
IF statement would follow this logic:  IF the country
field is blank, THEN don't print a bar code at all, ELSE
IF the ZIP4 field is blank, THEN create a barcode based
on just the ZIP, ELSE create a barcode based on
ZIP & ZIP4.

I was successful in creating the correct field data to
produce the bar code by routing the ODBC data through
Excel and doing the IF/THEN there, but it adds several
extra steps to the process and this process is run daily
and currently through 3 steps (Run, Merge, Print).  If I
can create the IF within Word, it could stay a 3 step
process instead of the 8 - 10 I came up with by pushing it
through Excel.

Thanks,
Jackie
Doug Robbins - Word MVP - 01 Apr 2004 07:27 GMT
Hi Jackie,

I can get the following Word If....Then ....Else field to display the
relevant barcodes

{ BARCODE { IF { MERGEFIELD Zip4 } <> "" "{ MERGEFIELD "Zip" }-{ MERGEFIELD
"Zip4" }" "{ MERGEFIELD "Zip" }" }\u}

and also this (as long as there is a country)

{ BARCODE { IF { MERGEFIELD Country } <> "" { IF { MERGEFIELD Zip4 } <> ""
"{ MERGEFIELD "Zip" }-{ MERGEFIELD "Zip4" }" "{ MERGEFIELD "Zip" }" } ""}
\u}

But if there is no country, the latter displays

No Zip Code!

which I guess is technically correct, but is probably not what you want.

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 have an ODBC connection to a database on another
> server.  In this database I have 2 fields for the
[quoted text clipped - 16 lines]
> Thanks,
> Jackie
Jackie Mulholland - 01 Apr 2004 15:12 GMT
Thank you,
That's exactly what I was looking for.
Jackie
>-----Original Message-----
>Hi Jackie,
[quoted text clipped - 39 lines]
>
>.

Rate this thread:






 
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.