SelectCurrentIndent 方法

       

向前扩展所选内容,直至遇到具有另一种段落左右缩进量的文本为止。

expression.SelectCurrentIndent

expression   必需。该表达式返回一个 Selection 对象。

示例

本示例跳转到活动文档中与活动文档的第一段的段落缩进量不同的第一个段落的开始。

With Selection
    .HomeKey Unit:=wdStory, Extend:=wdMove
    .SelectCurrentIndent
    .Collapse Direction:=wdCollapseEnd
End With

本示例判断活动文档中的所有段落的段落左或右缩进量是否相同,然后在一个消息框显示判断结果。

With Selection
    .HomeKey Unit:=wdStory, Extend:=wdMove
    .SelectCurrentIndent
    .Collapse Direction:=wdCollapseEnd
End With
If Selection.End = ActiveDocument.Content.End - 1 Then
    MsgBox "All paragraphs share the same left " _
        & "and right indents."
Else
    MsgBox "Not all paragraphs share the same left " _
        & "and right indents."
End If