Partager via


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

Concepts

Selection Object

Selection Object Members