Difficulty to display StyleRef Field in Header due to quotation marks in heading

A

andreas

Dear Experts:
I got a document which I need to format, It regrettably has got a
strange heading 1 where part of it is ENCLOSED BY QUOATION MARKS. I
now need to refer to this specific heading 1 in the header using a
STYLEREF field.
But these QUOTATION MARKS WITHIN THE HEADING are causing me trouble,
i.e. the right result is not displayed. How do I have to tell Word to
treat the quoation marks within the heading differently?

Help is appreciated. Thank you very much. Regards, Andreas

EXAMPLE
Heading 1: "There is one more thing to think about" as Einstein once
said
Referring to this heading 1 in header: {IF{STYLEREF "Heading 1"} =
""There is one more thing to think about" as Einstein once said" "it
is working" "it is not working"}
 
K

Klaus Linke

Hi Andreas,

Don't know whether there's a more elegant solution, but maybe you could use
a QUOTE field:

{IF{STYLEREF "Heading 1"} = {QUOTE \"There\ is\ one\ more\ thing\ to\ think\
about\"\ as\ Einstein\ once\ said} "it is working" "it is not working"}

You'd have to "escape" all quote marks and spaces with a backslash...
I just tested it in Word 2003 -- seems to work.

Regards,
Klaus
 
A

andreas

Hi Andreas,

Don't know whether there's a more elegant solution, but maybe you could use
a QUOTE field:

{IF{STYLEREF "Heading 1"} = {QUOTE \"There\ is\ one\ more\ thing\ to\ think\
about\"\ as\ Einstein\ once\ said} "it is working" "it is not working"}

You'd have to "escape" all quote marks and spaces with a backslash...
I just tested it in Word 2003 -- seems to work.

Regards,
Klaus







- Zitierten Text anzeigen -


Klaus,

thank you very much for the quick answer. It is working, fine. In the
meantime I happened to come across another solution which is working
fine as well and I guess is a little more elegant:

The quotation marks in the heading itself are replaced by Symbol
Fields:
Heading 1: { SYMBOL 34 \* MERGEFORMAT }There is one more thing to
think about{ SYMBOL 34 \* MERGEFORMAT } as Einstein once said

Referring to this heading 1 in the header: {IF{STYLEREF "Heading 1"} =
"{ SYMBOL 34 \* MERGEFORMAT }There is one more thing to think
about{ SYMBOL 34 \* MERGEFORMAT } as Einstein once said" "it is
working" "it is not working"}

Thank you Klaus.

Regards, Andreas
 
P

Peter Jamieson

I was just about to suggest something similar, but slightly more compact if
you need to do a lot of this stuff.

You should not need those \*MERGEFORMAT switches.

You can also try a single nested field at the top of your document (all the
{} need to be the special field code braces)

{ SET q { QUOTE 34 } }

then

{ IF { STYLEREF "Heading 1" } = ""{ q }There is one more thing to think
about{ q } as Einstein once said" "it is working" "it is not working"}

Peter Jamieson
 
A

andreas

I was just about to suggest something similar, but slightly more compact if
you need to do a lot of this stuff.

You should not need those \*MERGEFORMAT switches.

You can also try a single nested field at the top of your document (all the
{} need to be the special field code braces)

{ SET q { QUOTE 34 } }

then

{ IF { STYLEREF "Heading 1" } = ""{ q }There is one more thing to think
about{ q } as Einstein once said" "it is working" "it is not working"}

Peter Jamieson










- Zitierten Text anzeigen -

Peter,
thank you very much. Very good advice. Regards, Andreas
 

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