Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Robseym
 
Posts: n/a
Default limits on if statements

Is there a limit to how many 'If_then_else' statements a mail merge document
can contain?


Rob
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default limits on if statements

Only if you try and nest them.

--

Graham Mayor - Word MVP

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


Robseym wrote:
Is there a limit to how many 'If_then_else' statements a mail merge
document can contain?


Rob



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Robseym
 
Posts: n/a
Default limits on if statements

Thanks for that. it begs two further questions:

1) what is the limit on nested if statements?
2) How would you count the number of nested statements in the following
examples? - not written using the actual code:

I think the first statement is three nested, the second statement is only
two and the third contains no nested statements but I could be wrong.

1. IF([conditon], "text", "IF([condition2], "text", "IF([condition3],
"text", "")"" )

2. IF([conditon], "text", "IF([condition2], "text", "")IF([condition3],
"text", "")" )

3. IF([conditon], "text", "")IF([condition2], "text", "")IF([condition3],
"text", "")

Hope you can help as I am compiling a monster doc and don't want any nasty
surprises.

Rob

"Graham Mayor" wrote:

Only if you try and nest them.

--

Graham Mayor - Word MVP

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


Robseym wrote:
Is there a limit to how many 'If_then_else' statements a mail merge
document can contain?


Rob




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod
 
Posts: n/a
Default limits on if statements

You can nest up to 20 IF fields in Word.

As for your examples, Word fields aren't coded quite like that. Turning them
into the correct structu
1. {IF{conditon1}= TRUE "True text 1" {IF{conditon2}= TRUE "True text 2"
{IF{conditon3}= TRUE "True text 3" "False Text"}}}
all 3 conditions are nested
2. {IF{conditon1}= TRUE "True text 1" {IF{conditon2}= TRUE "True text 2"
"False Text 1"}{IF{conditon3}= TRUE "True text 3" "False Text 2"}}
the first two conditions are nested.
3. {IF{conditon1}= TRUE "True text 1" "False Text 1"}{IF{conditon2}= TRUE
"True text 2" "False Text 2"}{IF{conditon3}= TRUE "True text 3" "False Text
3"}
no conditions are nested.

If any of the 'FALSE' strings has no text, you can omit the double quotes
for them also. Empty 'TRUE' text strings must retain the double quotes,
though.

Cheers


"Robseym" wrote in message
...
Thanks for that. it begs two further questions:

1) what is the limit on nested if statements?
2) How would you count the number of nested statements in the following
examples? - not written using the actual code:

I think the first statement is three nested, the second statement is only
two and the third contains no nested statements but I could be wrong.

1. IF([conditon], "text", "IF([condition2], "text", "IF([condition3],
"text", "")"" )

2. IF([conditon], "text", "IF([condition2], "text", "")IF([condition3],
"text", "")" )

3. IF([conditon], "text", "")IF([condition2], "text", "")IF([condition3],
"text", "")

Hope you can help as I am compiling a monster doc and don't want any nasty
surprises.

Rob

"Graham Mayor" wrote:

Only if you try and nest them.

--

Graham Mayor - Word MVP

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


Robseym wrote:
Is there a limit to how many 'If_then_else' statements a mail merge
document can contain?


Rob






  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Robseym
 
Posts: n/a
Default limits on if statements

Thank macropod looks like i'm going to be ok with that. I knew the coding was
different but I just wanted to make it easier to see, but that should help
others who look at this post.

Rob

"macropod" wrote:

You can nest up to 20 IF fields in Word.

As for your examples, Word fields aren't coded quite like that. Turning them
into the correct structu
1. {IF{conditon1}= TRUE "True text 1" {IF{conditon2}= TRUE "True text 2"
{IF{conditon3}= TRUE "True text 3" "False Text"}}}
all 3 conditions are nested
2. {IF{conditon1}= TRUE "True text 1" {IF{conditon2}= TRUE "True text 2"
"False Text 1"}{IF{conditon3}= TRUE "True text 3" "False Text 2"}}
the first two conditions are nested.
3. {IF{conditon1}= TRUE "True text 1" "False Text 1"}{IF{conditon2}= TRUE
"True text 2" "False Text 2"}{IF{conditon3}= TRUE "True text 3" "False Text
3"}
no conditions are nested.

If any of the 'FALSE' strings has no text, you can omit the double quotes
for them also. Empty 'TRUE' text strings must retain the double quotes,
though.

Cheers


"Robseym" wrote in message
...
Thanks for that. it begs two further questions:

1) what is the limit on nested if statements?
2) How would you count the number of nested statements in the following
examples? - not written using the actual code:

I think the first statement is three nested, the second statement is only
two and the third contains no nested statements but I could be wrong.

1. IF([conditon], "text", "IF([condition2], "text", "IF([condition3],
"text", "")"" )

2. IF([conditon], "text", "IF([condition2], "text", "")IF([condition3],
"text", "")" )

3. IF([conditon], "text", "")IF([condition2], "text", "")IF([condition3],
"text", "")

Hope you can help as I am compiling a monster doc and don't want any nasty
surprises.

Rob

"Graham Mayor" wrote:

Only if you try and nest them.

--

Graham Mayor - Word MVP

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


Robseym wrote:
Is there a limit to how many 'If_then_else' statements a mail merge
document can contain?


Rob






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
limits in vertical ruler Don Smith Page Layout 1 November 19th 05 03:11 AM
copy certain statements in a doc automatically to the end of doc Big Daddy Fletch Microsoft Word Help 2 August 26th 05 12:33 AM
IF statements always returning the "False" condition JCSadie Mailmerge 4 February 28th 05 03:42 PM
MS Word Limits Raymond Scroggy Microsoft Word Help 1 February 15th 05 08:30 PM
Using Hyperlinks in Mail Merge IF...THEN...ELSE Statements Mark V Mailmerge 8 November 30th 04 01:31 PM


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