SelectCurrentTabs 方法 (Word)Selection.SelectCurrentTabs method (Word)

向前扩展选定内容,直至遇到另一种制表位的段落为止。Extends the selection forward until a paragraph with different tab stops is encountered.

语法Syntax

expression.expression. SelectCurrentTabs

_表达式_是必需的。expression Required. 表示 Selection 对象的变量。A variable that represents a Selection object.

示例Example

本示例选定活动文档的第二段,然后将所选内容扩展到所有包含相同制表位的段落。This example selects the second paragraph in the active document and then extends the selection to include all other paragraphs that have the same tab stops.

Set myRange = ActiveDocument.Paragraphs(2).Range 
myRange.Select 
Selection.SelectCurrentTabs

本示例选定具有相同制表位的段落,并检索第一个制表位的位置。This example selects paragraphs that have the same tab stops and retrieves the position of the first tab stop. 本示例将所选内容移至具有相同制表位的下一个区域。The example moves the selection to the next range of paragraphs that have the same tab stops. 然后,将第一组段落中设置的制表位添至当前所选内容中。The example then adds the tab stop setting from the first group of paragraphs to the current selection.

With Selection 
 .SelectCurrentTabs 
 pos = .Paragraphs.TabStops(1).Position 
 .Collapse Direction:=wdCollapseEnd 
 .SelectCurrentTabs 
 .Paragraphs.TabStops.Add Position:=pos 
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.