Sample files: Using Word’s {StyleRef} field to customize a header

These files demonstrate the technique described in the article How to use Word’s {StyleRef} field to customize a header.

Article overview:

Word’s {StyleRef} field displays text based on the applied style. For instance, you could repeat a chapter’s title in the header by applying the Title style to the title content. If you update the chapter’s title, the {StyleRef} field in the header will update as well, but it isn’t a conditional process.

For this technique, we’ll start by adding a conditional subtitle to last month’s demonstration file and use that file’s macro to display one or the other. Then, we’ll use Word’s {StyleRef} field to display the resulting subtitle in the document’s header. Not only will you learn about {StyleRef}, but you’ll learn how to combine two solutions to get the final results you need.

Resource Details

TechRepublic logo
Provided by:
Other Download