if statement and compare

C

Cathy S

I want to set up the following in my letter checking a few merge fields ...
If either OCAS_OP_1 or OCAS_OP_2 or OCAS_OP_3 or OCAS_SUS_1 or OCAS_SUS_2 or
OCAS_SUS_3 = "Y" to display message A and if not to display message B

Can you help? Thanks
 
D

Doug Robbins

{ IF { MERGEFIELD OCAS_OP_1 } = "Y" "MESSAGE A" { IF { MERGEFIELD
OCAS_OP_2 } = "Y" "MESSAGE A" { IF { MERGEFIELD OCAS_OP_3 } = "Y" "MESSAGE
A" { IF { MERGEFIELD OCAS_SUS_1 } = "Y" "MESSAGE A" { IF { MERGEFIELD
OCAS_SUS_2 } = "Y" "MESSAGE A" { IF { MERGEFIELD OCAS_SUS_3 " = "Y" "MESSAGE
A" "MESSAGE B" }}}}}}

You must use Ctrl+F9 to insert each pair of field delimiters { }; Alt+F9 to
toggle off the display of the field codes and probably F9 to update the
fields to display the result.

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