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)
Usage
Dim Unit As Object
Dim Extend As Object
Dim returnValue As Integer
Dim selection1 As Selection
returnValue = selection1.HomeKey(Unit, Extend)
Syntax
Function HomeKey( _
<InAttribute()> Optional ByRef Unit As Object, _
<InAttribute()> Optional ByRef Extend As Object _
) As Integer
int HomeKey(
[In, Optional] ref object Unit,
[In, Optional] ref object Extend
);
public: Int32 HomeKey(
&Object^ Unit,
&Object^ Extend
);
public int HomeKey(
/*in*/System.Object Unit,
/*in*/System.Object Extend
);
function HomeKey(
Unit : Object,
Extend : Object
) : int;
Parameters
- Unit
Optional Object. The unit by which the selection is to be moved or extended. WdUnits.
- Extend
Optional Object. Specifies the way the selection is moved. WdMovementType.
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.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000
Target Platforms
See Also
Reference
Selection Interface
Microsoft.Office.Interop.Word Namespace