Selection.StartOf(Object, Object) Method

Definition

Moves or extends the start position of the specified selection to the beginning of the nearest specified text unit.

public int StartOf (ref object Unit, ref object Extend);
abstract member StartOf : obj * obj -> int
Public Function StartOf (Optional ByRef Unit As Object, Optional ByRef Extend As Object) As Integer

Parameters

Unit
Object

Optional WdUnits. The unit by which the start position of the specified range or selection is to be moved.

Extend
Object

Optional WdMovementType.

Returns

Remarks

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.

Applies to