Reply
 
Thread Tools Display Modes
  #1   Report Post  
WordUser
 
Posts: n/a
Default Multiple "or" in "If Statement"

Would appreciate proper syntax for the following "If Statement":

{IF {MERGEFIELD AlphaCode} = "A" or "B" or "C" or "D" or "E"
"TRUE" "FALSE"}

Thanks





  #2   Report Post  
JudithJubilee
 
Posts: n/a
Default

Hello there,

Try this:

{IF {MERGEFIELD AlphaCode} = "A" "True" {IF {MERGEFIELD
AlphaCode} = "B" "True" {IF {MERGEFIELD AlphaCode}
= "C" "True" {IF {MERGEFIELD AlphaCode} = "D" "True" {IF
{MERGEFIELD AlphaCode} = "E" "True" "False" }}}}}

Hope this helps

Judith

-----Original Message-----
Would appreciate proper syntax for the following "If

Statement":

{IF {MERGEFIELD AlphaCode} = "A" or "B" or "C" or "D"

or "E"
"TRUE" "FALSE"}

Thanks





.

  #3   Report Post  
Peter Jamieson
 
Posts: n/a
Default

Unfortunately you can't do it that way round.

There are several ways you could try this, e.g.

{ IF { MERGEFIELD AlphaCode } = "A"
"TRUE"
"{ IF { MERGEFIELD Alphacode } = "B"
"TRUE" "FALSE" }" }

but extended to C, D and E, or

{ IF { ={ COMPARE { MERGEFIELD AlphaCode } = "A" }+{ COMPARE { MERGEFIELD
AlphaCode } = "B" }+{ COMPARE { MERGEFIELD AlphaCode } = "C" } } 0 "TRUE"
"FALSE" }

also extended to D and E.

Peter Jamieson
"WordUser" wrote in message
...
Would appreciate proper syntax for the following "If Statement":

{IF {MERGEFIELD AlphaCode} = "A" or "B" or "C" or "D" or "E"
"TRUE" "FALSE"}

Thanks







Reply
Thread Tools
Display Modes

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Back Arrow when hyperlinking - multiple documents O. Hardin Microsoft Word Help 0 January 13th 05 09:09 PM
Multiple styles in a single paragraph skibikegolf Microsoft Word Help 1 January 5th 05 09:57 AM
IF Statement using multiple Expressions with Bolean Viperpurple Mailmerge 3 December 19th 04 02:33 PM
Multiple docs open multiple words Ron Smith New Users 2 December 11th 04 09:21 PM
Need multiple Ifs in Merge Fields Pat Cortez Mailmerge 1 November 30th 04 01:11 AM


All times are GMT +1. The time now is 01:34 PM.

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"