Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Rhiannon Rhiannon is offline
external usenet poster
 
Posts: 2
Default Can I compare more than two merge field values using =AND or =OR?

I'm working in Word 2007. I have a list of mergefields (anywhere between 3
and 7 depending) that I would like to test the values of - if all of them
come back true, return one block of text, else return another block of text.
It works fine when I try and compare the values of two mergefields:

{IF { = AND ( { COMPARE {Mergefield 1} = "Y"}, {COMPARE {mergefield 2} 2
} ) } = 1 "true" "false" }

but as soon as I try and compare the values of three or more mergefields:

{IF { = AND ( { COMPARE {Mergefield 1} = "Y"}, {COMPARE {mergefield 2} 2
}, { COMPARE {mergefield 3" = "text" } ) } = 1 "true" "false" }

it breaks. Is there a way to expand beyond two comparisons, using either the
=AND or the =OR formulas? I'd rather not start nesting piles of these if I
can help it. Thanks muchly!!
 
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
Insert date field into merge-query options-compare to richard Microsoft Word Help 1 November 8th 06 10:52 AM
MailMerge Through VBA Printing Actual Field Names NOT Field Values AndrewC Mailmerge 1 April 23rd 06 08:07 AM
How do I compare later/earlier dates in a mail merge IF field? AdamT Mailmerge 1 March 13th 06 09:17 PM
How do I compare later/earlier dates in a mail merge IF field? AdamT Mailmerge 0 March 13th 06 04:06 PM
percentage values in a merge field ? Biff Mailmerge 1 November 16th 05 02:58 PM


All times are GMT +1. The time now is 06:34 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"