Format the names in the document by using a paragraph or character style.
Insert two STYLEREF fields in the document header.
- On the View menu, click Header and Footer.
- In the header, click where you want to insert the information.
- On the Insert menu, click Field.
- In the Categories box, click (All).
- In the Field names box, click StyleRef.
- In the Style name box, select the style you used to format the names.
Note If you don't see a list of style names, click Hide Codes at the bottom of the dialog box.
- Under Field options, select the options you want, but do not select the Search from bottom of page to top check box.
- Click OK.
- Type some text to indicate a range, such as "through" or a dash.
- Repeat steps 3 through 7 for the second field, except that in step 7, select the Search from bottom of page to top check box.
When you print the document, the first and last names on each page appear in the header on that page.
Where you insert the STYLEREF field determines the direction that Microsoft Word searches for the style and thus affects which text is inserted.
When you insert the field in:
Headers and footers (results for printed document)
If you select the Search from bottom of page to top check box, Word searches from the bottom of the page to the beginning and then the end of the document.
Headers and footers (results for electronic document)
Word searches the section that contains the STYLEREF field, from the beginning, for the specified style. If the style isn't found, Word searches from the end of the section to the end of the document.