View Single Post
  #8   Report Post  
Peter Jamieson
 
Posts: n/a
Default

try

{ IF { =or({ COMPARE "{ MERGEFIELD "County" }" = "Hillsborough" },
{ COMPARE "{ MERGEFIELD "County" }" = "Pinellas" }) } = 1
"Test positive" "Test Negative" }

if you ave a thrid comparison, you will need a second OR, e.g.

{ IF { =or(or({ COMPARE "{ MERGEFIELD "County" }" = "Hillsborough" },
{ COMPARE "{ MERGEFIELD "County" }" = "Pinellas" }) ,
{ COMPARE "{ MERGEFIELD "County" }" = "County3" }) } = 1
"Test positive" "Test Negative" }

Unwieldy, isn't it?

Just a suggestion, but if you are inserting form a separate file you might
be better off using the result of the { =} field as part of the file name,
e.g. if you have

Counties0.doc

and

Counties1.doc

you might use

{ INCLUDETEXT "c:\\mydocs\\Counties{{ =or(or({ COMPARE "{ MERGEFIELD
"County" }" = "Hillsborough" },
{ COMPARE "{ MERGEFIELD "County" }" = "Pinellas" }) ,
{ COMPARE "{ MERGEFIELD "County" }" = "County3" }) }.doc"

or you can use 2 bookmark names within a single file to achive something
similar.

Peter Jamieosn
"Lara Z" wrote in message
...
Yes, obviously, but if this is a valid operator what is the syntax for
using it - either in general or with my example, as everything I have
tried has not worked...?? I tried the following and it does not work,
i.e., does not return "Test Positive" or "Test Negative" .

{ IF { = OR ({MERGEFIELD "County"}="Hillsborough", {MERGEFIELD
"County"}="Pinellas")} =1 "Test Positive" "Test Negative"}


"smcash" wrote in message
...
I'm new to this stuff, but as far as I can tell the operator is simply:

Or

-smcash




"Lara Z" wrote:

I am trying to code a merge document that will insert an additional
two-page
document if the 'COUNTY' field is one of eight counties. The additional
document is the same for all eight counties. In WordPerfect this could
be
done simply with the SWITCH/ENDSWITCH construct. I know there is no
equivalent in Word, but is there any easier way to do this than doing
eight
back-to-back IF statements with the same (redundant) two pages of text
inserted in each "then" part of the IF statement? Is there an OR
operator in
Word that might help accomplish this?