Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
infoctc infoctc is offline
external usenet poster
 
Posts: 1
Default IF function chokes on dobule-quotes

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.

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default IF function chokes on dobule-quotes

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

"infoctc" wrote in message
...
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.



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
Can I search for straight quotes (") and exclude curly quotes (€œ € Eric Microsoft Word Help 4 May 1st 23 02:47 PM
Large Merge File Chokes Nick X Mailmerge 3 April 11th 07 07:38 PM
Script to change Smart quotes to straight quotes for all users? Michael Microsoft Word Help 1 November 15th 06 05:12 AM
how to enable the smart quotes function? Rev. New Users 1 October 7th 05 08:18 PM
Can Word be set-up to change curly quotes to straight quotes when. K&D'smom Microsoft Word Help 4 February 19th 05 08:06 AM


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