Export (0) Print
Expand All
Expand Minimize

Selection.SelectCurrentIndent Method (Word)

Published: July 16, 2012

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

expression .SelectCurrentIndent

expression Required. A variable that represents a Selection object.

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

Community Additions

ADD
Show:
© 2014 Microsoft