Field codes: GoToButton field

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 (hyperlink: A word, phrase, picture, icon, symbol or other element in a computer document or webpage on which a user may click to move to another part of the document or webpage or to open another document, webpage, or file.), 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, press Alt+F9.

Instructions

Destination

A bookmark (bookmark: A location or selection of text in a file that you name for reference purposes. Bookmarks identify a location within your file that you can later refer or link to.), page number, or item such as a footnote or annotation. The page number can be a reference inserted using the Cross-reference command (Insert menu, Reference submenu).

Use a letter and number for items other than page numbers; for example, to jump to the third section (section: A portion of a document in which you set certain page formatting options. You create a new section when you want to change such properties as line numbering, number of columns, or headers and footers.) 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 (field results: Text or graphics inserted in a document when Microsoft Word carries out a field's instructions. When you print the document or hide field codes, the field results replace the field codes.); otherwise, an error occurs.

Examples

In the following example, in which "Summary" is defined as a bookmark (bookmark: A location or selection of text in a file that you name for reference purposes. Bookmarks identify a location within your file that you can later refer or link to.), 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 in the Links group 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 image to jump to the summary.

 
 
Applies to:
Word 2013, Word 2010