Selection.GoTo (Word)

Moves the insertion point to the character position immediately preceding the specified item, and returns a Range object (except for the wdGoToGrammaticalError, wdGoToProofreadingError, or wdGoToSpellingError constant).

When you use the GoTo method with the wdGoToGrammaticalError, wdGoToProofreadingError, or wdGoToSpellingError constant, the Range object that is returned includes any grammar error text or spelling error text.

GoTo (What, Which, Count, Name)


Selection.GoTo What:=wdGoToHeading, Which:=wdGoToFirst
Selection.GoTo What:=wdGoToHeading, Which:=wdGoToAbsolute, Count:=1

Arguments

Optional arguments

The following arguments are optional

What (WdGoToItem) - The kind of item to which the range or selection is moved. Can be one of the WdGoToItem constants.

Here you can find possible values for WdGoToItem

Which (WdGoToDirection) - The item to which the range or selection is moved. Can be one of the WdGoToDirection constants.


Possible values are

wdGoToAbsolute An absolute position.
wdGoToFirst The first instance of the specified object.
wdGoToLast The last instance of the specified object.
wdGoToNext The next instance of the specified object.
wdGoToPrevious The previous instance of the specified object.
wdGoToRelative A position relative to the current position.

Count (Long) - The number of the item in the document. The default value is 1. Only positive values are valid. To specify an item that precedes the range or selection, use wdGoToPrevious as the Which argument and specify a Count value.

Name (String) - If the What argument is wdGoToBookmark, wdGoToComment, wdGoToField, or wdGoToObject, this argument specifies a name.