如果该属性值为 True,则扩展方式处于活动状态。当扩展方式处于活动状态时,以下方法的 Extend 参数默认值为 True。这些方法包括:EndKey、HomeKey、MoveDown、MoveLeft、MoveRight 和 MoveUp。而且状态栏中会出现字母“EXT”。Boolean 类型,可读写。
expression.ExtendMode
expression 必需。该表达式返回一个 Selection 对象。
该属性只能在运行时设置;“即时”模式中无法设置该属性。该属性不影响 EndOf 和 StartOf 方法的 Extend 参数。
本示例移动至段落的开头并选择该段落和其后的两个句子。
With Selection
.MoveUp Unit:=wdParagraph
.ExtendMode = True
.MoveDown Unit:=wdParagraph
.MoveRight Unit:=wdSentence, Count:=2
End With
本示例折叠当前的选定内容,打开扩展模式,并选定当前句。
With Selection
.Collapse
.ExtendMode = True
' Select current word.
.Extend
' Select current sentence.
.Extend
End With