IF command to insert a comma if the Title field is not blank

K

K Hyzer

I am merging a mailing list to a Word letter. I will be printing the person's
name followed by their title. How do I set up the IF command to insert a
comma after the person's name if the Title field is not blank? I am using
Word 2003.
 
D

Doug Robbins - Word MVP

Insert and If...then...Else... field from the Word Fields toolbar, or using
Ctrl+F9 to insert the field delimiters, create the following in the document

{ IF { MERGEFIELD Title } <> "" ", { MERGEFIELD Title }" }

Use Alt+F9 to toggle off the display of field codes.

--
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
 
K

K Hyzer

This helped - I'm almost there. This does insert the title field, but not a
comma. This is what I put in the document:
{ IF {MERGEFIELD Title } <>"" ", {MERGEFIELD Title }" }

Any suggestions?

Thanks,
Kim
 
D

Doug Robbins - Word MVP

You probably did not use Ctrl+F9 for each pair of field delimiters. You
cannot insert the { } by using Shift plus the number 9 and 0 number keys (US
Keyboard layout)

--
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