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 / April 2008

Tip: Looking for answers? Try searching our database.

OR statement for more than 2 expressions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dom - 04 Apr 2008 11:14 GMT
Hi,

I would like to use the "OR field code" (probably not using the correct
terminology) for 3 expression. It works fine for 2 but can't get it to work
with 3. I've used it in my previous job so I know it's possible, but can't
seem to find a sample "script" anywhere. Can anyone help?

This is what I have (which doesn't work):
{IF {= OR ({MERGEFIELD “LetterType”}=”A”, {MERGEFIELD “LeterType”}= “B”,
{MERGEFIELD “LeterType”}= “C”)} = 1 “TEXT 1” “TEXT2”}

What I want is to print TEXT 1 if LetterType = A or B or C.

Thanks in advance for your help.
Dom
Graham Mayor - 04 Apr 2008 14:37 GMT
Try

{ IF{ =({ IF{ Mergefield "LeterType" } = "A" 1 0 } + { IF{ Mergefield
"LeterType" } = "B" 1 0 } + { IF{ Mergefield "LeterType" } = "C" 1 0 })} = 1
"Text1" "Text2" }

and change the smart quotes to straight quotes.

Shouldn't that be LetterType ?

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Hi,
>
[quoted text clipped - 12 lines]
> Thanks in advance for your help.
> Dom
 
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.