Conditional Mail Merge

P

pls

I'm doing a mail merge with three lines of address:

Mergefield 1: Name
Mergefield 2: AddrLine
Mergefield 3: CityStZip

If the student's address line in field 2 is "Union Mailbox XXX", I need to
suppress line 3.

If they have on off-campus address, then line 3 needs to print.

Based on an earlier response to a different question, I put on line 3:
{IF "{MERGEFIELD AddrLine\*Union}"''{MERGEFIELD CityStZip}"}
This works to suppress line 3 for those whose address begins with "Union"
but it's also suppressing line 3 for all others.

What am I doing wrong? Thanks!
 
$

$hri...!

1. In a new blank document, start the mail merge. To do this, use one of the
following procedures, as appropriate for the version of Word that you are
running:

Microsoft Word 2002

On the Tools menu, click Letters and Mailings, and then click Mail Merge
Wizard.

Microsoft Office Word 2003

On the Tools menu, click Letters and Mailings, and then click Mail Merge.

Microsoft Office Word 2007

On the Mailings tab, click Start Mail Merge, and then click Step by Step
Mail Merge Wizard.

2. In the Mail Merge task pane under Select document type, click to select
Directory.

3. Click Next: Starting document.

4. Under Select starting document, click to select Use the current document.

5. Click Next: Select recipients.

6. Under Use an existing list, click Browse.

7. In the Select Data Source dialog box, select the sample file you created
in the Set Up the Data File section.

8. If the Confirm Data Source dialog box appears, select a data type that is
appropriate for the type of file that you created in the Set up the data file
section. For example, if you created the file in Microsoft Excel, select
either MS Excel Worksheets via DDE (*.xls) or Excel Files via ODBC (*.xls).

9. In the Mail Merge Recipients dialog box, click OK.

10. Using the following example as a guide, insert fields to compare the key
field in each row with the key field in the previous row, and to insert one
string of text if they are different and another string of text if they are
the same.

http://support.microsoft.com/kb/294686/en-us?FR=1
 
G

Graham Mayor

What you actually need is

{If {Mergefield AddrLine} <> "Union*" "{Mergefield CityStZip}"}

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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