Extend Method

Applies To

Selection object.

Description

Turns extend mode on and extends the selection to the next unit of text. The progression is as follows: word, sentence, paragraph, section, entire document. If Character is specified, extends the selection through the next instance of the specified character.

Syntax

expression.Extend(Character)

expression   An expression that returns a Selection object.

Character Optional Variant. The character that the selection is to be extended through. This argument is case sensitive.

See Also

MoveEndUntil method, MoveEndWhile method.

Example

This example extends the selection through the next instance of a capital "R" and then decreases the selection by one character.

With Selection
    .Extend Character:="R"
    .MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
End With