Conditional Fields?

J

Julie

I would like to create a condition in which a true value
of a certain field would print the contents of a
different field and a false value would print the
contents of a third field.

This is my rudimentary failed attempt. Could someone
please guide me in a better direction?

{If Title = "Ms." {MERGEFIELD Name} {MERGEFIELD Spouse}}

Thanks,
Julie
 
D

Doug Robbins - Word MVP

The construction should be:

{If {MERGEFIELD Title} = "Ms." {MERGEFIELD Name} {MERGEFIELD Spouse}}

You must use Ctrl+F9 for each pair of field delimiters { } if you insert
this directly from the keyboard

Otherwise, use the If...then...Else word field, select the Title mergefield
in the "Insert Word Field: IF" dialog, enter Ms. in the Compare to: control
and put A in the Insert this text: control and B in the Otherwise insert
this text: control. Then click on OK.

Then in the Document, press Alt+F9 to display the field codes, select the A
and then for the list of merge fields, select the Name field. Then select
the B and from the list select the Spouse field. The A and the B should
then be replaced by those fields so that you end up with the above field
construction.
--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
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