View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod
 
Posts: n/a
Default Compare Mailing_Address with Business_Address that includes countr

Hi Heliotrope,

Actually, you don't need to *remove* the country from Business_Address
before making the comparison. All you need to do is to code the field to
disregard it.

An IF test with a wildcard will do the trick. The field construction is:
{IF{MERGEFIELD Business_Address}= "{ MERGEFIELD Mailing_Address }*"
{MERGEFIELD "Company"}}

Cheers
--
macropod
[MVP - Microsoft Word]


"Heliotrope" wrote in message
...
This question derives from the helpful exchange "Conditionally print

outlook
company in mail merge (4/22/06)."

I tried the suggested solution but found that when Business_Address

includes
the country, the routine fails. Here's the key part:
{IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD

"Business_Address" }"
"{MERGEFIELD "Company"}. How do I programatically remove the country

from
Business_Address before making the comparison?