Export (0) Print
Expand All
Expand Minimize

Document.GoTo Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Returns a Microsoft.Office.Interop.Word.Range that represents the start position of the specified item, such as a page, bookmark, or field.

Namespace:  Microsoft.Office.Tools.Word
Assemblies:   Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

Range GoTo(
	ref Object What,
	ref Object Which,
	ref Object Count,
	ref Object Name
)

Parameters

What
Type: System.Object

The kind of item to which the range or selection is moved. Can be one of the WdGoToItem values.

Which
Type: System.Object

The item to which the range or selection is moved. Can be one of the WdGoToDirection values.

Count
Type: System.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
Type: System.Object

If the What argument is wdGoToBookmark, wdGoToComment, wdGoToField, or wdGoToObject, this argument specifies a name.

Return Value

Type: Microsoft.Office.Interop.Word.Range
A Range that represents the start position of the specified item, such as a page, bookmark, or field.

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.

Show:
© 2014 Microsoft