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 / November 2004

Tip: Looking for answers? Try searching our database.

Nested IF MERGEFIELD statements

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rushak - 05 Nov 2004 23:38 GMT
I'm trying to apply the logic of IF MERGEFIELD A = A and IF MERGEFIELD B = B
DO this.  I haven't successfully been able to do this.  Does anyone have any
suggestions.  This is what I have gotten so far, but I can't seem to get the
syntax correct:

{IF {MERGEFIELD PropertyState} = "OR" "{IF {MERGEFIELD Investor} = "VA" "The
result when the condition is met" "The result when the condition is not
met"}"}
Greg Maxey - 05 Nov 2004 23:57 GMT
Rushak,

You do the braces OK

{IF {MF A} = "A""{IF {MF B} = "B""Conditions Met""Conditions Not
Met"}""Conditions Not Met"}

Signature

Greg Maxey/Word MVP
A Peer in Peer to Peer Support

> I'm trying to apply the logic of IF MERGEFIELD A = A and IF
> MERGEFIELD B = B DO this.  I haven't successfully been able to do
[quoted text clipped - 4 lines]
> "VA" "The result when the condition is met" "The result when the
> condition is not met"}"}
rushak - 06 Nov 2004 00:34 GMT
Greg,

I edited my statement to how you have it shown and when I update the field
it shows the False condition, but when I actually do the mail merge with my
data source, I get no results....not even my false condition.  The logic
makes sense.  I've broken out each IF MF on a seperate line to verify the
data is correct which it is.  Thanks for your help.  I forgot to mention this
is Word 2002.

Rushak.

> Rushak,
>
[quoted text clipped - 11 lines]
> > "VA" "The result when the condition is met" "The result when the
> > condition is not met"}"}
Greg Maxey - 06 Nov 2004 01:10 GMT
Rushak,

As far as I can tell the construction is right.  You might try confirming
your construction with a few bookmarks and REF fields located in your
document.  If you can make that work, then substitute the REF fields with
your merge fields.

Signature

Greg Maxey/Word MVP
A Peer in Peer to Peer Support

> Greg,
>
[quoted text clipped - 26 lines]
>>> "VA" "The result when the condition is met" "The result when the
>>> condition is not met"}"}
Graham Mayor - 06 Nov 2004 09:59 GMT
I assume that you have used CTRL+F9 to set each pair of field boundaries? If
so, Greg's construction should work - to clarify, using your original
example and assuming that OR and VA are actual results both of which need to
be true:

{IF {MERGEFIELD PropertyState} = "OR" "{IF {MERGEFIELD Investor} = "VA" "The
result when the condition is met" "The result when the condition is not
met"}"The result when the condition is not met"}

It might help to insert a {Mergefield PropertyState} field and a {Mergefield
Investor} field in your merge document to ensure that they do actually
produce OR and VA.

Signature

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

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

> Greg,
>
[quoted text clipped - 26 lines]
>>> "VA" "The result when the condition is met" "The result when the
>>> condition is not met"}"}
 
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.