From: dolezelt on
Why the following example does not work?

Example:
Bookmark "town" has value "Pasco"
{IF town = Prague "Not true" "{IF town = Pasco "True" " "} "}

The outcome of this function is "{IF town = Pasco " but I am expecting
outcome "True". That means the word does not take into account another nested
function IF.

I am trying to use nested function "If" because I saw this example in Word
2003 help where nested If is used (I thought that it will work):

{IF {MERGEFIELD Město} = "Brno" "Obyvatelům Brna náleží speciální sleva."
"{IF {MERGEFIELD Město} = "Hořovice" "Obyvatelům Hořovic náleží speciální
sleva." " "} "}

Any solution to makes it work?
From: macropod on
Hi dolezelt,

Try:
{IF{Town}= "Prague" "Not true" {IF{Town}= "Pasco" "True"}}

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.

--
Cheers
macropod
[Microsoft MVP - Word]


"dolezelt" <dolezelt(a)discussions.microsoft.com> wrote in message news:9BBF5BF4-BF1F-40E6-8612-A3C38A6B7940(a)microsoft.com...
> Why the following example does not work?
>
> Example:
> Bookmark "town" has value "Pasco"
> {IF town = Prague "Not true" "{IF town = Pasco "True" " "} "}
>
> The outcome of this function is "{IF town = Pasco " but I am expecting
> outcome "True". That means the word does not take into account another nested
> function IF.
>
> I am trying to use nested function "If" because I saw this example in Word
> 2003 help where nested If is used (I thought that it will work):
>
> {IF {MERGEFIELD Město} = "Brno" "Obyvatelům Brna náleží speciální sleva."
> "{IF {MERGEFIELD Město} = "Hořovice" "Obyvatelům Hořovic náleží speciální
> sleva." " "} "}
>
> Any solution to makes it work?