text between symbol quotes breaking across lines

P

pam-austin

I'm using some nested IF codes in a mail merge, and I need smart quotes
inside one of the conditions. So I'm using a SYMBOL field code to put them
in. This works okay, but the result after merging gives me a problem. If the
text is near the end of the line, it will break, with the first quote on line
and text and second quote on next line. I get something like my "
cat" instead of my "cat".

Inserting non-breaking spaces before and after the quote marks doesn't help
(after all, I'm not trying to keep words separated by a space together, I'm
trying to keep the quotes with the word).

Thanks!
 
P

Peter Jamieson

Have you tried the non-break non-space character (in the
Insert|Symbol|Special characters dialog) ? I have a feeling it did not work
at one time, and even now it displays as a sort of rectangle, but on preview
it does seem to disappear and do the job it is supposed to do. I think.

Peter Jamieson
 
P

pam-austin

Thanks for the reply. I just tried inserting a "No-Width Non Break" before
the symbol field and in-between the symbol field and the text. Looks like a
rectangle on-screen and in page preview and doesn't fix the breaking
behavior. I am on Word 2000, but the end users are on Word 2003, so perhaps
it will work for them.

Any other suggestions? Is there anyway to "escape" a quote within the mail
merge field? I've tried \ -- it allows the quote to appear without messing
up the output, but displays itself also (i.e. _name is \"Ginger\"_)! Here
are some details of the code (I think you understand the problem, Peter, just
wanted to give more detail) is something like this:

{IF {MERGEFIELD petname} <> "" "I have a {IF {MERGEFIELD pettype} = "D"
"dog" "cat"} and her name is {MERGEFIELD petname}" "I have no pet"}

This shows properly (_I have a dog and her name is Ginger_). But I need the
petname to have quotes around it. Putting in plain quotes or smart quotes
ends up with _I have a dog and her name is_ (the sentence just ends because
the merge got confused).

Putting in the {SYMBOL 148 \* MERGEFORMAT} provides the proper output, but
if it ends up near the end of the line I have the breaking problem.

{IF {MERGEFIELD petname} <> "" "I have a {IF {MERGEFIELD pettype} = "D"
"dog" "cat"} and her name is {SYMBOL 147 \* MERGEFORMAT}{MERGEFIELD
petname}{SYMBOL 148 \* MERGEFORMAT}" "I have no pet".}

(keeping or removing mergeformat makes no difference).
 
P

Peter Jamieson

Yes, { QUOTE \" } (where you use the "smart" quote instead of the straight
quote - you can cut and paste one from somewhere else or insert one using
Insert|Symbol) will do it. (You are right that \" does not work when you
insert it directly in the IF field result text.)

Peter Jamieson
 
P

pam-austin

That worked - it does everything I need with quotes inside the condition,
nested if, and getting the quote in the output with the proper line-breaking.

Thanks so much, Peter!
 

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