IF function chokes on dobule-quotes

I

infoctc

I have an IF function like this:

{if {MERGEFIELD fieldA}="" "" "Field Caption: {MERGEFIELD fieldB}" }

which chokes when fieldA or fieldB has double-quotes (") in the data, and
prints only the text inside the quotes.

Is there any workaround for this?

So that if fieldA is non-blank let's say, and if fieldB value is:
Hello I my name is "Foo"

Then I want the IF function to print
Field Caption: Hello I my name is "Foo"

I have no control over the value in these fields so I can't manipulate that
text beforehand - it comes from the database.

Thanks.
 
D

Doug Robbins - Word MVP

There is definitely something odd going on there. I have been able to word
around it by changing the main document type to a "Directory" (it would be
"Catalog" in versions of Word before XP) and then formatting the first
paragraph in the main document so that it has a page break before it.

Depending upon the rest of the document, that may or may not suit (e.g. page
numbers, etc. You could possibly work around that by inserting the actual
number on each page rather than use a page number field.

--
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