Applies ToWord for Microsoft 365 Word for Microsoft 365 for Mac Word 2021 Word 2021 for Mac Word 2019 Word 2019 for Mac Word 2016

The GoToButton field inserts a jump command, which helps you view long online documents. When you double-click the results of a GoToButton field, Microsoft Word moves the insertion point to the specified location in the document. Hyperlinks, which are represented by the Hyperlink field, are often a better alternative to the GoToButton field.

Syntax

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

{ GOTOBUTTON Destination DisplayText }

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

Instructions

Destination

A bookmark, page number, or item such as a footnote or annotation. The page number can be a reference inserted using the Cross-reference command on the Insert tab.

Use a letter and number for items other than page numbers; for example, to jump to the third section in a document, type s3

Letter

Description

s

Section

l

Line

f

Footnote

a

Annotation

Note: The number doesn't refer to the actual number of an item. For example, "f4" refers to the fourth footnote in the document, regardless of its reference mark number.

DisplayText

Text or a graphic to appear as the "button." You can use a field that results in text or a graphic, such as Bookmark or IncludePicture. The text or graphic must appear on one line in the field result; otherwise, an error occurs.

Examples

In the following example, in which "Summary" is defined as a bookmark, clicking here causes Word to jump to the summary.

Double-click { GOTOBUTTON Summary here } to jump to the summary.

This field and the text surrounding it produce this result:

Double-click here to jump to the summary.

In the following example, a PageRef field indicates a page number. To insert the PageRef field, click the Cross-reference command on the Insert tab, and then select the item (such as a table or heading) that you want to jump to. (In the Cross-reference dialog box, make sure that you select Page Number in the Insert reference to box.) You must enclose the letter "p" and the PageRef field in quotation marks.

Double-click { GOTOBUTTON "p { PAGEREF _Ref317041789 }" Button image} to jump to the summary.

The field displays this result:

Double-click Button imageto jump to the summary.

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.