Selection.StartOf Method

Moves or extends the start position of the specified 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)


Function StartOf ( _
    ByRef Unit As Object, _
    ByRef Extend As Object _
) As Integer
Dim instance As Selection
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


  • Unit
    Type: System.Object%
    Optional WdUnits. The unit by which the start position of the specified range or selection is to be moved.

Return Value

Type: System.Int32


This method returns an Integer that indicates the number of characters by which the 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 selection is already at the beginning of the specified unit, this method doesn't move or extend the selection.

See Also


Selection Interface

Selection Members

Microsoft.Office.Interop.Word Namespace