Document.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.
Returns a Range that represents the start position of the specified item, such as a page, bookmark, or field.
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
The kind of item to which the range or selection is moved. Can be one of the WdGoToItem values.
- Which
- Object
The item to which the range or selection is moved. Can be one of the WdGoToDirection values.
- Count
- 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
If the What
argument is wdGoToBookmark, wdGoToComment, wdGoToField, or wdGoToObject, this argument specifies a name.
Returns
A Range that represents the start position of the specified item, such as a page, bookmark, or field.
Remarks
When you use this method with the wdGoToGrammaticalError, wdGoToProofreadingError, or wdGoToSpellingError constant, the Range that is returned includes any grammar error text or spelling error text.
Optional Parameters
For information on optional parameters, see Optional Parameters in Office Solutions.