How do I apply a different font to a cross reference?

G

Guest

I have a form in Word in which I want the user to be able to enter
information in one place and then have this information automatically
populate to another place within the document.

I have used cross references to accomplish this task very nicely. The
problem is that I want the first appearance of the information to be
formatted with one type of font, and the second appearance of the information
to be formatted with another type of font. Seems like it should be easy
enough to just use the format font command on the position of the cross
reference. This only works on the first word of the fill-in. If someone
types Joe Smith at the top of the page and I want Joe Smith to automatically
be filled in later in the document but in a different font, only Joe will be
formatted correctly. Smith converts back to the default font of the document.
 
J

Jezebel

1. Insert \* MERGEFORMAT within the reference fields, so they look
something like { REF _123123123 \* MERGEFORMAT } (press Alt-F9 to
display/hide fieldcodes). That makes the format of the references
independent of the format of the reference source.

2. Define and apply a character style to the reference fields.
 
G

Graham Mayor

Actually no. It's a \*Charformat field switch you want here not a
\*mergeformat switch.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

Something is amiss there then. A mergeformat switch is supposed to retain
the format of the source whereas a charformat switch is supposed to retain
the format applied to the field.

From Word Help:

\*Charformat
Applies the formatting of the first letter of the field type to the entire
result. The result of the following example has bold formatting because the
"R" in "REF" is bold.

{ REF chapter2_title \* Charformat } displays "Whales of the Pacific".

\*MERGEFORMAT
Applies the formatting of the previous result to the new result. For
example, if you select the name displayed by the field { AUTHOR \*
MERGEFORMAT } and apply bold formatting, Microsoft Word retains the bold
formatting when the field is updated when the author name changes.


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jezebel

Did you try it with mergeformat? I created some green text and bookmarked,
then inserted a REF field into a black paragraph. On its own, the REF field
is also green; you can control-Q the par to make it black but it reverts to
green with field update. Add Mergefield and it stays black.
 
G

Graham Mayor

Yes I tried it - I have just repeated it using your example and it works
exactly as I indicated ?
This is the UK English version of Office 2003 with SP2 update.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jezebel

boh'


Graham Mayor said:
Yes I tried it - I have just repeated it using your example and it works
exactly as I indicated ?
This is the UK English version of Office 2003 with SP2 update.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
S

Suzanne S. Barnhill

I'm getting Jezebel's results here, but you must apply the desired format to
the REF field before updating.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
C

Cindy M -WordMVP-

Hi all,
I'm getting Jezebel's results here, but you must apply the desired format to
the REF field before updating.
MergeFormat will seem to work correctly, at first. Where the "gotcha" comes in
is if the LENGTH of the text the field is displaying should change (more
text). At some later point, you're likely to see that the field result has
mixed formatting. The MergeFormat field is designed to (try to) remember what
formatting was applied where in the field result. So mixed formatting would be
allowed (something \* CharFormat doesn't support). The problem is, once
MergeFormat has stored something, it's next to impossible to make the field
"behave" without removing the switch...

In my experience, it's really only useful when linking in Excel tables or
Databases (and even then, the same limitations apply if the amount of data
being displayed changes).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
G

Guest

It was the \*Charformat that gave me the result I was looking for. I tried
\* MERGEFORMAT also but it didn't help.

Thank you. It was all good information and is much appreciated.
 

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