TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Subject:Referring to first/last item on page in Word From:Dianne Phelan <dphelan -at- MANTOS -dot- COM> Date:Sat, 29 Oct 1994 11:52:20 PST
This is being posted to both TECHWR-L and WORD-PC.
In Word, to refer (in a header or footer) to the contents of
the FIRST instance of a particular style on a page (for
example, a Heading 1):
From the menu, select:
Insert--Field
In the Field dialog, in the Field Codes box, type:
styleref Heading 1
and press Return or click OK.
(or, to go the long way around, select Categories: Links and
References, Field Names: StyleRef, select Options button,
Styles tab, select your style name, Add to Field button, OK,
and OK.)
This inserts a field that looks like this if you are showing
field codes (instead of results):
{ STYLEREF Heading 1 \*MERGEFORMAT }
To refer to the contents of the LAST instance on the page, add
a \l (that's a small L) switch:
Insert--Field
styleref Heading 1 \l
To refer to just the paragraph numbering associated with the style:
Insert--Field
styleref Heading 1 \n
For example, if your Heading 1 style has paragraph numbers
(set up paragraph numbers by doing Format--Style,
select style name, Modify button, Format button,
Numbering, Numbered tab, select a numbering format, OK,
OK, Close)
and your page contains
Heading 1 1. Once upon a time
Heading 1 2. A lot of stuff happened
Heading 1 3. Happily ever after
then inserting the following fields in your header or
footer would produce these results:
styleref Heading 1 1. Once upon a time
styleref Heading 1 \n 1.
styleref Heading 1 \l 3. Happily ever after
styleref Heading 1 \l\n 3.
This isn't in the printed manual, just the online help (under
STYLEREF field).