ExtendMode 属性 (Word)Selection.ExtendMode property (Word)

如此 如果扩展模式处于活动状态。True if Extend mode is active. 读/写 BooleanRead/write Boolean.


expressionexpression. ExtendMode

_表达式_一个返回**Selection** 对象的表达式。expression An expression that returns a Selection object.


如果扩展模式处于活动状态, 则以下方法的 Extend 参数默认为True : EndKeyHomeKeyMoveDownMoveLeftMoveRight 和**MoveUp**。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. EndOf 和**StartOf** 方法的 Extend 参数不受此属性的影响。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

另请参阅See also

Selection 对象Selection Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.