Range.EndOf Method

Moves or extends the ending character position of a range or selection to the end of the nearest specified text unit.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

int EndOf(
	ref Object Unit,
	ref Object Extend
)

Parameters

Unit
Type: System.Object%
Optional Object. The unit by which to move the ending character position. Can be one of the WdUnits constants.
Extend
Type: System.Object%
Optional Object. Can be one of the WdMovementType constants.

Return Value

Type: System.Int32

This method returns a value that indicates the number of character positions the range or selection was moved or extended (movement is forward in the document).

If the both the starting and ending positions for the range or selection are already at the end of the specified unit, this method doesn't move or extend the range or selection.

Community Additions

ADD
Show: