Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / February 2005

Tip: Looking for answers? Try searching our database.

Multiple "or" in "If Statement"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
WordUser - 04 Feb 2005 13:23 GMT
Would appreciate proper syntax for the following "If Statement":

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

Thanks
JudithJubilee - 04 Feb 2005 13:57 GMT
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":
[quoted text clipped - 5 lines]
>
>.
Peter Jamieson - 04 Feb 2005 14:02 GMT
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
> Would appreciate proper syntax for the following "If Statement":
>
> {IF {MERGEFIELD AlphaCode} = "A" or "B" or "C" or "D" or "E"
> "TRUE" "FALSE"}
>
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.