HomeKey Method

See Also         Example         Applies To

Moves or extends the selection to the beginning of the specified unit. 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.

Note   This method corresponds to functionality of the HOME key.

Syntax

expression.HomeKey(Unit, Extend)

expression   An expression that returns a Selection object.

Unit   Optional Variant. The unit by which the selection is to be moved or extended. Can be one of the following WdUnits constants: wdStory, wdColumn, wdLine, or wdRow. The default value is wdLine.

Extend   Optional Variant. Specifies the way the selection is moved. Can be one of the following WdMovementType constants: wdMove or wdExtend. If the value of this argument is wdMove, the selection is collapsed to an insertion point and moved to the beginning of the specified unit. If it's wdExtend, the beginning of the selection is extended to the beginning of the specified unit. The default value is wdMove.