[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

REF

Syntax:

[ REF ] field-argument [ switches ]

Description: Inserts the text or graphics represented by the bookmark specified by text in field-argument. The bookmark shall be defined in the current document. Provided the bookmark name is not exactly the same as a field name, the REF prefix can be omitted. 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.

Field Value: The specified text or graphics.

Switches: One of the following general-formatting-switches: \* Caps, \* FirstCap, \* Lower, or \* Upper, and zero or one of the following field-specific-switches.

\d field-argument

text in this switch's field-argument specifies the character sequence that is used to separate sequence numbers and page numbers.

\f

Increments footnote, endnote, and annotation numbers that are marked by the bookmark, and inserts the corresponding footnote, endnote, and comment text.

\h

Creates a hyperlink to the bookmarked paragraph.

\n

For a referenced paragraph, causes the field result to have the entire paragraph number without trailing periods. No information about prior levels is displayed unless it is included as part of the current level.

\p

Causes the field result to contain the 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, in which case, "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.

\w

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

 

[Example: The following field

REF _Ref116788778 \r \h

makes a hyperlink reference. This kind of field is commonly used, to indicate forward references within a document. end example]