Selection.GoToNext Method

Returns a Range object that refers to the start position of the next item or location specified by the What argument.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
Function GoToNext ( _
    What As WdGoToItem _
) As Range
'Usage
Dim instance As Selection
Dim What As WdGoToItem
Dim returnValue As Range

returnValue = instance.GoToNext(What)
Range GoToNext(
    WdGoToItem What
)

Parameters

Return Value

Type: Microsoft.Office.Interop.Word.Range

Remarks

The GoToNext method moves the selection to the specified item (except for the wdGoToGrammaticalError, wdGoToProofreadingError, and wdGoToSpellingError constants).

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

See Also

Reference

Selection Interface

Selection Members

Microsoft.Office.Interop.Word Namespace