EscapeKey Method

Microsoft Word Visual Basic

EscapeKey Method

       

Cancels a mode such as extend or column select (equivalent to pressing the ESC key).

expression.EscapeKey

expression   Required. An expression that returns a Selection object.

Example

This example turns on and then cancels extend mode.

With Selection
    .ExtendMode = True
    .EscapeKey
End With