Skip to content

Latest commit

 

History

History
50 lines (30 loc) · 1.3 KB

Word.Selection.SelectCurrentAlignment.md

File metadata and controls

50 lines (30 loc) · 1.3 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Selection.SelectCurrentAlignment method (Word)
vbawd10.chm158663174
vbawd10.chm158663174
Word.Selection.SelectCurrentAlignment
89d76005-c75a-7548-c1da-da292183d5ab
06/08/2017
medium

Selection.SelectCurrentAlignment method (Word)

Extends the selection forward until text with a different paragraph alignment is encountered.

Syntax

expression. SelectCurrentAlignment

expression Required. A variable that represents a Selection object.

Remarks

There are four types of paragraph alignment: left, centered, right, and justified.

Example

This example positions the insertion point at the beginning of the first paragraph after the current paragraph that doesn't have the same alignment as the current paragraph. If the alignment is the same from the selection to the end of the document, the example moves the selection to the end of the document and displays a message.

Selection.SelectCurrentAlignment 
Selection.Collapse Direction:=wdCollapseEnd 
If Selection.End = ActiveDocument.Content.End - 1 Then 
 MsgBox "No change in alignment found." 
End If

See also

Selection Object

[!includeSupport and feedback]