Range.MoveEnd Method

Moves the ending character position of a range.

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

Syntax

'Declaration
Function MoveEnd ( _
    ByRef Unit As Object, _
    ByRef Count As Object _
) As Integer
'Usage
Dim instance As Range
Dim Unit As Object
Dim Count As Object
Dim returnValue As Integer

returnValue = instance.MoveEnd(Unit, Count)
int MoveEnd(
    ref Object Unit,
    ref Object Count
)

Parameters

  • Unit
    Type: System.Object%
    Optional WdUnits. The unit by which to move the ending character position.
  • Count
    Type: System.Object%
    Optional Object. The number of units to move. If this number is positive, the ending character position is moved forward in the document. If this number is negative, the end is moved backward. If the ending position overtakes the starting position, the range collapses and both character positions move together. The default value is 1.

Return Value

Type: System.Int32

Remarks

This method returns an integer that indicates the number of units the range or selection actually moved, or it returns 0 (zero) if the move was unsuccessful.

See Also

Reference

Range Interface

Range Members

Microsoft.Office.Interop.Word Namespace