Selection.Extend Method

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

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
Sub Extend ( _
    ByRef Character As Object _
)
'Usage
Dim instance As Selection
Dim Character As Object

instance.Extend(Character)
void Extend(
    ref Object Character
)

Parameters

  • Character
    Type: System.Object%
    Optional Object. 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.

Remarks

The Extend method sets the ExtendMode property to True,

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

See Also

Reference

Selection Interface

Selection Members

Microsoft.Office.Interop.Word Namespace