Field codes: Ref field

Microsoft Office Word 2003

Bookmark

The name of a bookmark. If the text marked by the bookmark contains a paragraph mark, the text preceding the REF field assumes the formatting of the paragraph in the bookmark.

ShowSwitches

\d
Specifies the characters that separate sequence numbers (such as chapter numbers) and page numbers.
\f
Increments footnote, endnote, or annotation numbers that are marked by the bookmark and inserts the corresponding note or comment text. For example, the bookmark "Note1" marks the reference mark of footnote 1. The field { REF Note1 \f } is inserted after footnote 2. The field result displays the footnote reference mark "3" in the document text and inserts the text of footnote 1 into the footnote window.
\h
Creates a hyperlink to the bookmarked paragraph.
\n
Causes the field to display the entire paragraph number for a referenced paragraph without trailing periods. No information about prior levels is displayed unless it is included as part of the current level.
\p
Causes the field to display its position relative to the source bookmark using the word "above" or "below."
If the REF field appears in the document before the bookmark, it evaluates to "below." If the REF field appears after the bookmark, it evaluates to "above." If the REF field appears within the bookmark, an error is returned.
This switch can also be used in conjunction with the \n, \r, and \w switches. When this is done, "above" or "below" is appended to the end of the field result.
\r
Inserts the entire paragraph number of the bookmarked paragraph in relative context— or relative to its position in the numbering scheme— without trailing periods.
\t
Causes the REF field to suppress non-delimiter or non-numerical text when used in conjunction with the \n, \r, or \w switch.

With this switch, for example, you can reference "Section 1.01," and only "1.01" is displayed in the result.

\w
Inserts the paragraph number of the bookmarked paragraph in full context from anywhere in the document.

For example, when referencing paragraph "ii.," a REF field with the \w switch would return "1.a.ii" as a result.

ShowExamples

The following REF field assigns the result of an ASK field that prompts the user for the cost per unit. The ASK field prompts the user for information when the field is updated and then assigns the user's input to the bookmark "unitcost":

{ ASK unitcost "What's the cost per unit?" }

{ REF unitcost }