Embedding quote marks in If-Else-Then statements

E

EHPorter

Is it possible to embed quote marks in If-Else-Then statements? Some sort
of switch or character that tells the merge to treat the quote mark ( " ) as
part of the text, rather than as part of the If command.

An example. The line:

{IF {Mergefield "Nicknames"} <> "" "The nickname is "Crash" Johnson" "There
is no nickname"} does not work, because the quotes around the word Crash are
treated as control characters in the If statement. Is there any way around
this?

Thanks
 
D

Doug Robbins

Use the following construction:

{IF {Mergefield "Nicknames"} <> "" { Quote "The nickname is '"'Crash'"'
Johnson" } "There is no nickname"}

where the quote marks either side of Crash are enclosed by apostrophes.
That is

apostrophe double quote apostrophe Crash apostrophe double quote apostrophe

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top