Selection.Previous method (Word)

Moves the selected text by the specified number of units, and returns a Range object relative to the collapsed selection.

Syntax

expression.Previous (Unit, Count)

expression Required. A variable that represents a Selection object.

Parameters

Name Required/Optional Data type Description
Unit Optional Variant Specifies the type of unit by which to move the selection. Can be one of the WdUnits constants.
Count Optional Variant The number of units by which you want to move. The default value is 1.

Return value

Range

Remarks

If the selection is just after the specified Unit, the selection is moved to the previous unit. For example, if the selection is just after a word (before the trailing space), the following instruction moves the selection backward to the previous word.

Selection.Previous(Unit:=wdWord, Count:=1).Select

See also

Selection Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.