Selection.EndKey Method
Moves or extends the selection to the end of the specified unit.
Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)
Syntax
'Declaration
Function EndKey ( _
ByRef Unit As Object, _
ByRef Extend As Object _
) As Integer
'Usage
Dim instance As Selection
Dim Unit As Object
Dim Extend As Object
Dim returnValue As Integer
returnValue = instance.EndKey(Unit, Extend)
int EndKey(
ref Object Unit,
ref Object Extend
)
Parameters
- Unit
Type: System.Object%
Optional Object. The unit by which the selection is to be moved or extended. WdUnits.
- Extend
Type: System.Object%
Optional Object. The unit by which the selection is to be moved or extended. WdUnits.
Return Value
Type: System.Int32
Remarks
This method returns an integer that indicates the number of characters the selection or active end was actually moved, or it returns 0 (zero) if the move was unsuccessful.
This method corresponds to functionality of the END key.