GoTo Method Example

This example moves the selection to the first cell in the next table.

Selection.GoTo What:=wdGoToTable, Which:=wdGoToNext

This example moves the insertion point just before the fifth endnote reference mark in the active document.

If ActiveDocument.Endnotes.Count >= 5 Then
    Selection.GoTo What:=wdGoToEndnote, _
        Which:=wdGoToAbsolute, Count:=5
End If

This example sets R1 equal to the first footnote reference mark in the active document.

If ActiveDocument.Footnotes.Count >= 1 Then
    Set R1 = ActiveDocument.GoTo(What:=wdGoToFootnote, _
        Which:=wdGoToFirst)
    R1.Expand Unit:=wdCharacter
End If

This example moves the selection down four lines.

Selection.GoTo What:=wdGoToLine, Which:=wdGoToRelative, Count:=4

This example moves the selection back two pages.

Selection.GoTo What:=wdGoToPage, Which:=wdGoToPrevious, Count:=2