Extend Method
Collapse the table of content
Expand the table of content

Selection.Extend Method (Word)

Office 2013 and later

Contribute to this content

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

Turns on extend mode, or if extend mode is already on, extends the selection to the next larger unit of text.

expression .Extend(Character)

expression Required. A variable that represents a Selection object.




Data Type





The character through which the selection is extended. This argument is case sensitive and must evaluate to a String or an error occurs. Also, if the value of this argument is longer than a single character, Microsoft Word ignores the command entirely.

Using this method sets the ExtendMode property to True if it is not already.

The progression of selected units of text is as follows: word, sentence, paragraph, section, entire document. If Character is specified, this method extends the selection forward through the next instance of the specified character. The selection is extended by moving the active end of the selection.

This example collapses the current selection to an insertion point and then selects the current sentence.

With Selection 
 ' Collapse current selection to insertion point. 
 ' Turn extend mode on. 
 ' Extend selection to word. 
 ' Extend selection to sentence. 
End With

Here is an example that accomplishes the same task without the Extend method.

With Selection 
 ' Collapse current selection. 
 ' Expand selection to current sentence. 
 .Expand Unit:=wdSentence 
End With

This example makes the end of the selection active and extends the selection through the next instance of a capital "R".

With Selection 
 .StartIsActive = False 
 .Extend Character:="R" 
End Wit
© 2016 Microsoft