Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
ibmm ibmm is offline
external usenet poster
 
Posts: 6
Default If/ and/ or statements with mail merge.

I am trying to figure out how to use an and statement with the mergefields.

if {MERGEFIELD TEST} = "nc" AND {MERGEFIELD TEST1} = "chg" {includetext
.....} " "}

but it's not working. how do you do this.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default If/ and/ or statements with mail merge.

Hi ibmm,

One way:
{IF{MERGEFIELD TEST}= "nc" {IF{MERGEFIELD TEST1}= "chg" {INCLUDETEXT ....}}}
Another way:
{SET String "{ MERGEFIELD TEST }{ MERGEFIELD TEST1 }"}{IF{REF String}= "ncchg" {INCLUDETEXT ....}}
And yet another way:
{IF{IF{MERGEFIELD TEST}= "nc" 1 0}+{IF{MERGEFIELD TEST1}= "chg" 1 0}= 2 {INCLUDETEXT ....}}

--
Cheers
macropod
[Microsoft MVP - Word]


"ibmm" wrote in message ...
I am trying to figure out how to use an and statement with the mergefields.

if {MERGEFIELD TEST} = "nc" AND {MERGEFIELD TEST1} = "chg" {includetext
....} " "}

but it's not working. how do you do this.

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
Mail merge question If Statements JAnderson Microsoft Word Help 4 January 29th 08 05:52 PM
Mail Merge if... then statements aaron Mailmerge 1 October 13th 06 06:08 PM
How can I write IF statements in Mail Merge Sayali Mailmerge 3 March 4th 05 09:31 AM
Mail Merge If Statements (Word 02) Tab Mailmerge 1 March 4th 05 09:01 AM
Using Hyperlinks in Mail Merge IF...THEN...ELSE Statements Mark V Mailmerge 8 November 30th 04 02:31 PM


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