Selection.GoTo(Object, Object, Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Moves the insertion point to the character position immediately preceding the specified item.
public Microsoft.Office.Interop.Word.Range GoTo (ref object What, ref object Which, ref object Count, ref object Name);
abstract member GoTo : obj * obj * obj * obj -> Microsoft.Office.Interop.Word.Range
Public Function GoTo (Optional ByRef What As Object, Optional ByRef Which As Object, Optional ByRef Count As Object, Optional ByRef Name As Object) As Range
Parameters
- What
- Object
Optional Object. The kind of item to which the selection is moved. Can be one of the WdGoToItem constants.
- Which
- Object
Optional Object. The item to which the selection is moved. Can be one of the WdGoToDirection constants.
- Count
- Object
Optional Object. 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
- Object
Optional Object. If the What
argument is wdGoToBookmark, wdGoToComment, wdGoToField, or wdGoToObject, this argument specifies a name.
Returns
Remarks
When you use the GoTo method with the wdGoToGrammaticalError, wdGoToProofreadingError, or wdGoToSpellingError constant, the Range that's returned includes any grammar error text or spelling error text.