ExtendMode Property
Collapse the table of content
Expand the table of content

Selection.ExtendMode Property (Word)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

True if Extend mode is active. Read/write Boolean.

expression .ExtendMode

expression An expression that returns a Selection object.

When Extend mode is active, the Extend argument of the following methods is True by default: EndKey, HomeKey, MoveDown, MoveLeft, MoveRight, and MoveUp. Also, the letters "EXT" appear on the status bar.

This property can only be set during run time; attempts to set it in Immediate mode are ignored. The Extend arguments of the EndOf and StartOf methods are not affected by this property.

This example moves to the beginning of the paragraph and selects the paragraph plus the next two sentences.

With Selection 
 .MoveUp Unit:=wdParagraph 
 .ExtendMode = True 
 .MoveDown Unit:=wdParagraph 
 .MoveRight Unit:=wdSentence, Count:=2 
End With

This example collapses the current selection, turns on Extend mode, and selects the current sentence.

With Selection 
 .ExtendMode = True 
 ' Select current word. 
 ' Select current sentence. 
End With
© 2016 Microsoft