Microsoft Office Tutorials and References
In Depth Information
Extracting text for a header or footer from body text
Extracting text for a header or footer from body text
You don’t always need to start a new section to make a header
or footer show different information from one page to the next.
Instead, you might be able to display the most recent text that’s
formatted with a specific style—such as a heading style—in the
body of the document. That is the purpose of the StyleRef field.
specified style only to the text that you want to repeat in the
header, not to anything else. If you need to use the built-in style
for several different kinds of information, create a new style
for use with the StyleRef field. Your custom style can even have
the same formatting as the built-in style; only its name must be
unique.
As an example, you might write a report in which each chapter
begins with its title, formatted with the Heading 1 style. You
can put a field in the document’s header, using the code
{ styleRef “heading 1” } . On each page, that field repeats the
title of the current chapter.
You might want to repeat only part of a paragraph from the
document’s body. For that purpose, you must use a character
style instead of a paragraph style or a linked style. Although a
linked style can be applied to just part of a paragraph, a StyleRef
field won’t recognize that text.
The successful use of the StyleRef field depends on applying the
1
2
Create and apply a custom style
1 Select the first text in your document that you want to repeat in the
header or footer. Apply any character formatting that you want that
text to have.
2 On the Home tab, in the Styles group, click the More button. Near
the bottom in the gallery that opens, click Create A Style.
sEE ALso For more information about defining custom styles,
see “Creating and modifying styles” on page 94.
Search JabSto ::




Custom Search