Range.StartOf Method
Moves or extends the start position of the specified range or selection to the beginning of the nearest specified text unit.
Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)
Syntax
'Declaration
Function StartOf ( _
ByRef Unit As Object, _
ByRef Extend As Object _
) As Integer
'Usage
Dim instance As Range
Dim Unit As Object
Dim Extend As Object
Dim returnValue As Integer
returnValue = instance.StartOf(Unit, Extend)
int StartOf(
ref Object Unit,
ref Object Extend
)
Parameters
- Unit
Type: System.Object%
Optional WdUnits. The unit by which the start position of the specified range or selection is to be moved.
- Extend
Type: System.Object%
Optional WdMovementType.
Return Value
Type: System.Int32
Remarks
This method returns an Integer that indicates the number of characters by which the range or selection was moved or extended. The method returns a negative number if the movement is backward through the document.
If the beginning of the specified range or selection is already at the beginning of the specified unit, this method doesn't move or extend the range or selection.