Range.StartOf(Object, Object) Range.StartOf(Object, Object) Method

Definition

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

public int StartOf (ref object Unit, ref object Extend);
Public Function StartOf (Optional ByRef Unit As Object, Optional ByRef Extend As Object) As Integer

Parameters

Unit

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

Extend

Optional WdMovementType.

Returns

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.

Applies to