Quotes in IF Field Code

D

Debbie S.

Is there some way to indicate that I want a double quote
to be treated literally within the Truetext or FalseText
(see syntax below) of an IF expression?

Word is assuming that the quote ends the text
expression. I tried using curly quotes instead of
straight quotes (when my opening quote was a straight
quote), but it still assumed that was the end of the text
expression.
{ IF Expression1 Operator Expression2 TrueText FalseText }

Thanks in advance.
 
M

macropod

Hi Debbie,

Try:

{ IF Expression1 Operator Expression2 "{QUOTE 34}TrueText{QUOTE 34}" "{QUOTE
34}FalseText{QUOTE 34}" }

This produces a result that displays as "True Text" or "False Text",
including the quotes. Replacing the leading and trailing 34s in each
expression with 147 and 148, respectively, can be used to generate 'smart'
quotes.

A 39 produces a single straight quote, while 145 and 146, respectively, can
be used to generate 'smart' single quotes.

Cheers
 

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