Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I search for straight quotes (") and exclude curly quotes (€œ € | Microsoft Word Help | |||
Large Merge File Chokes | Mailmerge | |||
Script to change Smart quotes to straight quotes for all users? | Microsoft Word Help | |||
how to enable the smart quotes function? | New Users | |||
Can Word be set-up to change curly quotes to straight quotes when. | Microsoft Word Help |