View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default Conditionally print outlook company in mail merge

First, to do this, you must be using the individual address fields, not the
ADDRESSBLOCK field.

Then, to do what you said, you need something like

{ IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD
"Business_Address" }" "{ MERGEFIELD "Business_Address_Street" } "" }

but I wonder if you actually need:

{ IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD
"Business_Address" }" "{ MERGEFIELD "Company" } "" }

To insert these nested fields, use ctrl-F9 to insert the pairs of special
field braces {}, and type everything else in between. There are other ways
to do it, but I think that's the most straightforward.

To do either of those, you will probably need to initiate your merge from
Outlook, because you may not get the same fields if you connect using the
Outlook Contacts option in the Word Merge Wizard.

Peter Jamieson


"Stukmeister" wrote in message
...
I am using MS Outlook Contacts with MS Word to mail merge envelopes. I need
to print the Company name line if the "Mailing Address" is a business
address. If the "Mailing Address" is a home address, I don't want to print
the Company name line.

A potential programatic solution would be: If MailingAddress =
BusinessAddress then print Company address line, else don't print Company
address line. I just don't know how to code it in Word.

Anyone know how to solve this?