Preserving formatting with field codes 
Author Message
 Preserving formatting with field codes

I am using the cross reference field in Word 97 (Insert > Cross-reference)
in a new document. After Word inserts the field, I apply blue and single
underline to the field results, so readers can see the cross-reference links
in the PDF version of the document.

The problem is, when Word updates the field, the blue, underline formatting
is lost.

How can I use the cross-reference field and yet preserve the blue, underline
formatting?

Christina Tolliver



Fri, 17 May 2002 03:00:00 GMT  
 Preserving formatting with field codes
Toggle the field code display (Alt+F9) and see whether your cross-reference
has the \* MERGEFORMAT switch. If it doesn't, add it. If it does, the
applied formatting SHOULD be preserved during updates, so something else is
wrong.

--
Suzanne S. Barnhill
Microsoft Word MVP
Words into Type
Fairhope, AL USA


Quote:
> I am using the cross reference field in Word 97 (Insert > Cross-reference)
> in a new document. After Word inserts the field, I apply blue and single
> underline to the field results, so readers can see the cross-reference
links
> in the PDF version of the document.

> The problem is, when Word updates the field, the blue, underline
formatting
> is lost.

> How can I use the cross-reference field and yet preserve the blue,
underline
> formatting?

> Christina Tolliver




Fri, 17 May 2002 03:00:00 GMT  
 Preserving formatting with field codes

Quote:

>Toggle the field code display (Alt+F9) and see whether your cross-reference
>has the \* MERGEFORMAT switch. If it doesn't, add it. If it does, the
>applied formatting SHOULD be preserved during updates, so something else is
>wrong.

Suzanne,

Thanks for your help. The cross-reference field did not include the
\*MERGEFORMAT switch. I included it, and the problem is solved.

Now, is there a way I can make Word automatically include this switch when I
insert a cross-reference? Or should I just plan on adding it manually? Or
could I create some kind of macro?

Christina Tolliver



Fri, 17 May 2002 03:00:00 GMT  
 Preserving formatting with field codes
Christina,

You can use Word's Find and Replace feature to handily add the  \*
MERGEFORMAT to your fields.  Hit Alt+F9 to reveal all the codes.  Then
Edit>Replace to search for \h (I add the hyperlink to my references) or
something else unique in your code and replace with \h  \* MERGEFORMAT.  Hit
Alt+F9 again to toggle the codes back off.

Look in Help for Find and Replace and also Wildcards for more information on
the Find and Replace feature.

Patrick

Quote:


>>Toggle the field code display (Alt+F9) and see whether your
cross-reference
>>has the \* MERGEFORMAT switch. If it doesn't, add it. If it does, the
>>applied formatting SHOULD be preserved during updates, so something else
is
>>wrong.

>Suzanne,

>Thanks for your help. The cross-reference field did not include the
>\*MERGEFORMAT switch. I included it, and the problem is solved.

>Now, is there a way I can make Word automatically include this switch when
I
>insert a cross-reference? Or should I just plan on adding it manually? Or
>could I create some kind of macro?

>Christina Tolliver



Fri, 17 May 2002 03:00:00 GMT  
 Preserving formatting with field codes
I'm not sure why Word ISN'T including the switch because it does so without
question when I insert a cross-reference using the Insert Cross-reference
dialog (and there doesn't seem to be any check box for it), and even if you
used Insert | Field to insert a {REF} field, the "Preserve formatting during
updates" box is checked by default (or at least it always has been on my
system).

--
Suzanne S. Barnhill
Microsoft Word MVP
Words into Type
Fairhope, AL USA


Quote:

> >Toggle the field code display (Alt+F9) and see whether your
cross-reference
> >has the \* MERGEFORMAT switch. If it doesn't, add it. If it does, the
> >applied formatting SHOULD be preserved during updates, so something else
is
> >wrong.

> Suzanne,

> Thanks for your help. The cross-reference field did not include the
> \*MERGEFORMAT switch. I included it, and the problem is solved.

> Now, is there a way I can make Word automatically include this switch when
I
> insert a cross-reference? Or should I just plan on adding it manually? Or
> could I create some kind of macro?

> Christina Tolliver



Fri, 17 May 2002 03:00:00 GMT  
 Preserving formatting with field codes
When I insert a cross-reference using the Insert Cross-reference dialog, the
switch is not automatically included. And, as you say, there's no check box
or anything for turning it on. Why is my Word acting differently from yours,
Suzanne? I'm using Word 97; are you?

I wish there were a check box or some way to always, automatically include
the switch, but, since there doesn't appear to be a way, I can follow
Patrick's suggestion to use Search and Replace.

Christina Tolliver

Quote:

>I'm not sure why Word ISN'T including the switch because it does so without
>question when I insert a cross-reference using the Insert Cross-reference
>dialog (and there doesn't seem to be any check box for it), and even if you
>used Insert | Field to insert a {REF} field, the "Preserve formatting
during
>updates" box is checked by default (or at least it always has been on my
>system).



Fri, 17 May 2002 03:00:00 GMT  
 Preserving formatting with field codes
Now that you mention it, I looked through some docs and saw that some CRs
had "\* mergeformat" and some didn't.  I certainly don't remember going back
through and adding the switch.  I'm not sure what I did or how to recreate
it.

Patrick

Quote:

>I'm not sure why Word ISN'T including the switch because it does so without
>question when I insert a cross-reference using the Insert Cross-reference
>dialog (and there doesn't seem to be any check box for it), and even if you
>used Insert | Field to insert a {REF} field, the "Preserve formatting
during
>updates" box is checked by default (or at least it always has been on my
>system).

>--
>Suzanne S. Barnhill
>Microsoft Word MVP
>Words into Type
>Fairhope, AL USA




>> >Toggle the field code display (Alt+F9) and see whether your
>cross-reference
>> >has the \* MERGEFORMAT switch. If it doesn't, add it. If it does, the
>> >applied formatting SHOULD be preserved during updates, so something else
>is
>> >wrong.

>> Suzanne,

>> Thanks for your help. The cross-reference field did not include the
>> \*MERGEFORMAT switch. I included it, and the problem is solved.

>> Now, is there a way I can make Word automatically include this switch
when
>I
>> insert a cross-reference? Or should I just plan on adding it manually? Or
>> could I create some kind of macro?

>> Christina Tolliver



Fri, 17 May 2002 03:00:00 GMT  
 Preserving formatting with field codes
I researched the MSKB and turned up a couple of articles that are somewhat
relevant. The first, Q173404, "WD97: General Information About
Cross-reference Fields," contains this text:

"NOTE: If you see an entry that looks something like {REF _Ref249586 \*
MERGEFORMAT} instead of text, Word is displaying field codes instead of
field
results. To see the field results, press ALT+F9."

The second, Q197758, "Cross-Reference Text Format Lost in Form Field
Bookmark," contains this text:

"After you have applied formatting to the cross-reference field, turn on the
field
codes. The field code should resemble the following:

   "{ref Text1 \* MERGEFORMAT}"

Both of these quotations seem to suggest that the natural (default) form of
the field includes the MERGEFORMAT switch, so it is interesting to speculate
what might cause it not to. I can't find any Options setting that seems to
have any bearing on this.

--
Suzanne S. Barnhill
Microsoft Word MVP
Words into Type
Fairhope, AL USA


Quote:
> Now that you mention it, I looked through some docs and saw that some CRs
> had "\* mergeformat" and some didn't.  I certainly don't remember going
back
> through and adding the switch.  I'm not sure what I did or how to recreate
> it.

> Patrick


> >I'm not sure why Word ISN'T including the switch because it does so
without
> >question when I insert a cross-reference using the Insert Cross-reference
> >dialog (and there doesn't seem to be any check box for it), and even if
you
> >used Insert | Field to insert a {REF} field, the "Preserve formatting
> during
> >updates" box is checked by default (or at least it always has been on my
> >system).

> >--
> >Suzanne S. Barnhill
> >Microsoft Word MVP
> >Words into Type
> >Fairhope, AL USA




> >> >Toggle the field code display (Alt+F9) and see whether your
> >cross-reference
> >> >has the \* MERGEFORMAT switch. If it doesn't, add it. If it does, the
> >> >applied formatting SHOULD be preserved during updates, so something
else
> >is
> >> >wrong.

> >> Suzanne,

> >> Thanks for your help. The cross-reference field did not include the
> >> \*MERGEFORMAT switch. I included it, and the problem is solved.

> >> Now, is there a way I can make Word automatically include this switch
> when
> >I
> >> insert a cross-reference? Or should I just plan on adding it manually?
Or
> >> could I create some kind of macro?

> >> Christina Tolliver



Fri, 17 May 2002 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Formatting code, Access has its own ideas, how can i preserve my formatting

2. Preserving formatting data using code

3. How to preserve formating when saving to HTML and field codes

4. How to preserve formating when saving to HTML and field codes

5. Preserve char formatting in styleref field

6. Preserving field formatting when exporting to Excel

7. Ask Fields Not Preserving Formatting

8. Preserving formatting when passing a merge field from access to Word

9. Question: MailMerge with Database field - Preserving Table Formatting

10. Preserving ComboBox List Ranges code after spreadsheet updating


 
Powered by phpBB® Forum Software © phpBB Group