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 / February 2007

Tip: Looking for answers? Try searching our database.

Mail merge Labels

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Koerner - 22 Feb 2007 01:52 GMT
Using MSOffice 2003 SP(2)  I have the following Excel fields on a label page
and it prints out all the labels just fine.

<<LastName>> <<Initial>>
<<Address1>> <<Address2>>
<<City>>, <<Prov>>
<<PostalCode>>
<<Country>>

I would like to be able to use the same Excel file and using  I guess IF
commands print the labels

IF the country = Canada, print the labels
IF the country <> Canada, print the labels

IF the country = Canada and the email field is blank, print the labels
IF the country <> Canada and the email field is blank, print the labels

Any assistance will be greatly appreciated.

Signature

Regards
Michael Koerner

Peter Jamieson - 22 Feb 2007 07:22 GMT
From your examples it's not completely clear what you're trying to do -
Eliminate labels that are not for Canada? Or avoid printing the Country
field if it's Canada? Or some combination of the two.

Assuming you want to eliminate records, you really need to filter your
records before you do the merge rather than use IF fields to try to
eliminate them. If you're a regular Excel user, you may know how to do that
easily in Excel and if so, that's probably the best approach. In Word...

Open your mail merge main document. Enable the Mail Merge Toolbar
(Tools|Customize). Then click the 3rd button (Mail Merge Recipients). Click
the tiny dropdown at the top of the "Country" column. If you see "Canada"
listed, select it. if not, click Advanced..." and use the form in the Query
Options Dialog box to select

     Country Equals Canada
and Email is not blank

or whatever the appropriate criteria are. Word uses these criteria to
construct a SQL Query but unfortunately it does not always get it right.

If your criteria are more complicated than the Query Options dialog can
manage you have to use VBA to issue the correct SQL query (which is one
reason why it's better to filter in Excel if you can).

Peter Jamieson
> Using MSOffice 2003 SP(2)  I have the following Excel fields on a label
> page and it prints out all the labels just fine.
[quoted text clipped - 15 lines]
>
> Any assistance will be greatly appreciated.
Michael Koerner - 22 Feb 2007 13:28 GMT
Using the Filter in Excel seems to be the best approach. I'm kinda doing
that right now by having 4 different Excel sheets (LOL) I'll ask in the
Excel group, thanks very much.

Signature

Regards
Michael Koerner

> From your examples it's not completely clear what you're trying to do -
> Eliminate labels that are not for Canada? Or avoid printing the Country
[quoted text clipped - 42 lines]
>>
>> Any assistance will be greatly appreciated.
Graham Mayor - 22 Feb 2007 14:00 GMT
While I agree with Peter about filtering in the data file, a possible
alternative method would be to have four different merge documents each
accessing the same data file.

In this case the label would have

Case 1
{IF {Mergefield Country} = "Canada" "{Mergefield LastName} {Mergefield
Initial}
{Mergefield Address1} {Mergefield Address2}
{Mergefield City}, {Mergefield Prov}
{Mergefield PostalCode}
{Mergefield Country}"}

Case 2
{IF {Mergefield Country} = "Canada" "{Mergefield LastName} {Mergefield
Initial}
{Mergefield Address1} {Mergefield Address2}
{Mergefield City}, {Mergefield Prov}
{Mergefield PostalCode}
{Mergefield Country}"}

Case 3
{ IF { Mergefield Country } = "Canada" "{ IF { Mergefield Email } = "" "{
Mergefield LastName } { Mergefield Initial }

{ Mergefield Address1 } { Mergefield Address2 }

{ Mergefield City }, { Mergefield Prov }

{ Mergefield PostalCode }

{ Mergefield Country }" ""}" "" }

Case 4

{ IF { Mergefield Country } <> "Canada" "{ IF { Mergefield Email } = "" "{
Mergefield LastName } { Mergefield Initial }

{ Mergefield Address1 } { Mergefield Address2 }

{ Mergefield City }, { Mergefield Prov }

{ Mergefield PostalCode }

{ Mergefield Country }" ""}" "" }

This would test each record to see that it fits the criteria

You could even save each of the four blocks of fields as autotext entries
and add them to the first label of a blank merge label document and
propagate then merge. Note that the fields are entered from the keyboard
using CTRL+F9 for each pair of brackets.

For other examples see http://www.gmayor.com/formatting_word_fields.htm

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Using the Filter in Excel seems to be the best approach. I'm kinda
> doing that right now by having 4 different Excel sheets (LOL) I'll
[quoted text clipped - 50 lines]
>>> Regards
>>> Michael Koerner
Graham Mayor - 22 Feb 2007 14:08 GMT
On reflection - perhaps not. This would leave blank labels where the data
does not match. Stick to the filtering ;)

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> While I agree with Peter about filtering in the data file, a possible
> alternative method would be to have four different merge documents
[quoted text clipped - 106 lines]
>>>> Regards
>>>> Michael Koerner
Michael Koerner - 22 Feb 2007 20:43 GMT
LOL, I asked in the Excel ng, and they said I should filter through Word.

Guess I'll stick with what I have got, a different Excel worksheet for each
merge.

Signature

Regards
Michael Koerner

> On reflection - perhaps not. This would leave blank labels where the data
> does not match. Stick to the filtering ;)
[quoted text clipped - 109 lines]
>>>>> Regards
>>>>> Michael Koerner
 
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.