Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

The PageRef field inserts the page number of a bookmark for a cross-reference. To cross-reference items in a document, use the Cross-reference command (Insert tab, Links group).

Syntax

When you view the PageRef field in your document, the syntax looks like this:

{ PAGEREF Bookmark [\* Format Switch ] }

Note:  A field code tells the field what to show. Field results are what’s shown in the document after having evaluated the field code. To toggle between viewing the field code and the field code results, press Alt+F9.

Instructions

\* Format Switch

Optional switch that overrides the numeral style selected in the Number format box in the Page Number Format dialog box (Insert tab, Headers & Footers group, Page Number command, Format Page Numbers).

Switches

\h

Creates a hyperlink to the bookmarked paragraph.

\p

Causes the field to display its position relative to the source bookmark.

The string "on page #" is used when the PageRef field is not on the current page. When the PageRef field is on the current page, it omits "on page #" and returns "above" or "below" only.

Example

In the following example, the bookmark "Worldpop1990" marks the table containing figures for 1990.

Field:

The world population in 1991 was 5 billion; for 1990 figures, see the table { PAGEREF Worldpop1990 \p }.

Result:

The position of the table is inserted in place of the field:

"... see the table above."

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×