View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Quotes within mergefield text

Instead of each double-quote, try using the following field:
{ QUOTE 34 }
If you want to keep your texts as short as possible, you can put the
following at the beginning of your document
{ SET q { QUOTE 34 } }
then use
{ q }

e.g.

{ IF { MERGEFIELD City } = "Chicago" "Please call our { QUOTE 34 }local{
QUOTE 34 }office." "Please return the enclosed form in the { QUOTE 34
}provided{ QUOTE 34 } envelope." }

or

{ SET q { QUOTE 34 } }{ IF { MERGEFIELD City } = "Chicago" "Please call
our { q }local{ q }office." "Please return the enclosed form in the { q
}provided{ q } envelope." }

All the {} need to be the special field code braces that you can insert
using ctrl-F9

Peter Jamieson

http://tips.pjmsn.me.uk

On 20/11/2009 15:35, clhare wrote:
I am trying to set up a paragraph with an "If" mergefield, but I'm
having trouble figuring out how to do it. The text I need to use
contains quotation marks. Because of those quotation marks, I don't get
all the text when the merge is run. In the example below, I've enclosed
"local" and "provided" in quotes. When I run the merge, the paragraph
cuts off at the first quotation within the paragraph.

{ IF { MERGEFIELD City } = "Chicago" "Please call our "local" office."
"Please return the enclosed form in the "provided" envelope." }

Is there a way to get this to work so I can apply it to my actual text?
I am not allowed to change the text, so I have to find a way to make it
work with the quotation marks.

Thanks!

Cheryl