IF Statement

J

John B

I would like to know how to go about putting in IF statement into a mail
merge? I have 2 fields, one is called Firstname and the other is called
Client. I would like to have Firstname pulled, and IF blank, then pull
Client. Any help on this would be greatly appreciated. Thanks.

John
 
D

Doug Robbins - Word MVP

The field construction that you will need is:

{ IF { MERGEFIELD Firstname } <> "" { MERGEFIELD Firstname } { MERGEFIELD
Client } }

Each pair of field delimiters { } must be inserted using Ctrl+F9 and you use
Alt+F9 to toggle off the display of the field codes. You will need a space
either side of the <>.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
J

John B

Doug,

Thanks. I remember doing something similiar to this a few years ago, but
couldn't remember how to do it. I have an addition to this though. I have
another field to add to this. As before, I would like to have Firstname
pulled, and IF blank, then pull Client, and IF Client blank, then pull
Businessname. Hope you can help with this again. Thanks.

John
 
D

Doug Robbins - Word MVP

Just include another If...then...Else field construction

{ IF { MERGEFIELD Firstname } <> "" { MERGEFIELD Firstname } { IF{
MERGEFIELD
Client } <> "" { MERGEFIELD Client } { MERGEFIELD Businessname } } }


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

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