Need multiple Ifs in Merge Fields

P

Pat Cortez

During the merge, I would like to test (1) if a field is "Business" then type
in Company name If it is not blank. I'm using the If..Then..Else to do this.
Can someone supply the syntax for this using multiple IFs? Thanks!
 
D

Doug Robbins

If the company name is going to change for each record, it would be far
better to add a field to the data source to contain the name.

{ IF { MERGEFIELD "yourmergefieldthatmaycontainBusiness" } = "Business" {
MERGEFIELD "CompanyName" } "" }

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
P

Pat Cortez

Doug, thanks for your reply but I've tried this before and it isn't enough.
Let me try to explain a little more. Sometimes the mailing address is a home
address, not always a business address. What is happening is that the home
address shows up with a company name, not good. So that is why I need to
test first to see if the mailing address is a business address and then if it
is, to add the Company name, otherwise don't. I believe what I need is the
syntax for a nested IF. Hope you've got a solution. Thanks in advance. Pat
 
D

Doug Robbins

Who is determining what sort of address it is, you or the computer? What
does the "test" amount to?

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
P

Pat Cortez

Hi Doug. Thanks for your continued help. There is a field holding either
the word "Business" or "Home". This determines whether to go onto the next
decision whether to print the Company name or not. Hope this helps to
understand the question. What I'm after is the syntax for a multiple IF
statement I could use during a merge. Thanks again.
 
D

Doug Robbins

The field will look something like:

{ IF { MERGEFIELD "Thefieldthatwillcontaineitherbusinessorhome" } =
"Business" { MERGEFIELD "Companynamemergefield" } "" }

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 

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