Selection.HomeKey Method

Moves or extends the selection to the beginning of the specified unit.

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

Syntax

'Declaration
Function HomeKey ( _
    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.HomeKey(Unit, Extend)
int HomeKey(
    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.

Return Value

Type: System.Int32

Remarks

This method corresponds to functionality of the HOME key.

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

See Also

Reference

Selection Interface

Selection Members

Microsoft.Office.Interop.Word Namespace