#1   Report Post  
RUCerius
 
Posts: n/a
Default = AND

MS Word Help gives several great examples of using IF...THEN...ELSE with the
=AND operator but I have yet to find a way to compose the statement. I keep
getting: Error! Unknown op code for conditional

As far a 'free' help the closest I have come is Hans from Woody's Lounge who
gave me some great tips.
http://www.wopr.com/cgi-bin/w3t/show...&Number=504396

Any MVP's out there who can explain to a MS Word Mail Merge newbie how I can
use the =AND and the =OR constructs and also any gotcha's to be careful of?
Someone said you can't go beyond 1 =AND statement in an IF...THEN...ELSE.
(Of course I'd be happy to get 1 to work!).

Here is my 'field construction' as it stands now:

{ IF { =AND ({ COMPARE { MERGEFIELD ID } = 200000},{ COMPARE { MERGEFIELD
ID } = 300000} ) } = 1 "OK" "BAD" }
TIA
  #2   Report Post  
Peter Jamieson
 
Posts: n/a
Default

It looks OK and works here, but all the field braces {} have to be the sort
you can insert using ctrl-F9. If they already are, what I would suggest is
that you selection each expression in turn (e.g. { MERGEFIELD ID }, {
COMPARE { MERGEFIELD ID } = 200000 } then use right-click and toggle field
codes to see the result of that part of the whole construct to see if you
can detect which part is causing the problem.

Peter Jamieson

"RUCerius" wrote in message
...
MS Word Help gives several great examples of using IF...THEN...ELSE with
the
=AND operator but I have yet to find a way to compose the statement. I
keep
getting: Error! Unknown op code for conditional

As far a 'free' help the closest I have come is Hans from Woody's Lounge
who
gave me some great tips.
http://www.wopr.com/cgi-bin/w3t/show...&Number=504396

Any MVP's out there who can explain to a MS Word Mail Merge newbie how I
can
use the =AND and the =OR constructs and also any gotcha's to be careful
of?
Someone said you can't go beyond 1 =AND statement in an IF...THEN...ELSE.
(Of course I'd be happy to get 1 to work!).

Here is my 'field construction' as it stands now:

{ IF { =AND ({ COMPARE { MERGEFIELD ID } = 200000},{ COMPARE { MERGEFIELD
ID } = 300000} ) } = 1 "OK" "BAD" }
TIA



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:36 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"