SelectCurrentIndent Method

Applies To

Selection object.

Description

Extends the selection forward until text with different left or right paragraph indents is encountered.

Syntax

expression.SelectCurrentIndent

expression Required. An expression that returns a Selection object.

See Also

LeftIndent property, RightIndent property, SelectCurrentAlignment method, SelectCurrentSpacing method, SelectCurrentTabs method.

Example

This example jumps to the beginning of the first paragraph in the document that has different indents than the first paragraph in the active document.

With Selection
    .HomeKey Unit:=wdStory, Extend:=wdMove
    .SelectCurrentIndent
    .Collapse Direction:=wdCollapseEnd
End With
This example determines whether all the paragraphs in the active document are formatted with the same left and right indents and then displays a message box indicating the result.

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