Alignment Property
Applies To
ListLevel object, PageNumber object, Paragraph object, ParagraphFormat object, Paragraphs collection object, Row object, Rows collection object, TabStop object, TextEffectFormat object.
Description
ListLevel object: Returns or sets the alignment for the list level for the list template. Can be one of the following WdListLevelAlignment constants: wdListLevelAlignCenter, wdListLevelAlignLeft, or wdListLevelAlignRight. Read/write Long.
PageNumber object: Returns or sets the alignment for the page number. Can be one of the following WdPageNumberAlignment constants: wdAlignPageNumberCenter, wdAlignPageNumberInside, wdAlignPageNumberLeft, wdAlignPageNumberOutside, or wdAlignPageNumberRight. Read/write Long.
Paragraph, Paragraphs, or ParagraphFormat object: Returns or sets the alignment for the specified paragraphs. Can be one of the following WdParagraphAlignment constants: wdAlignParagraphLeft, wdAlignParagraphCenter, wdAlignParagraphRight, or wdAlignParagraphJustify. Read/write Long.
Row or Rows object: Returns or sets the alignment for the specified rows. Can be one of the following WdRowAlignment constants: wdAlignRowLeft, wdAlignRowCenter, or wdAlignRowRight. Read/write Long.
TabStop object: Returns or sets the alignment for the specified tab stop. Can be one of the following WdTabAlignment constants: wdAlignTabBar, wdAlignTabCenter, wdAlignTabDecimal, wdAlignTabLeft, wdAlignTabList, or wdAlignTabRight. Read/write Long.
See Also
ListLevels property, SelectCurrentAlignment method, VerticalAlignment property.
Example
This example right-aligns the first paragraph in the active document.
ActiveDocument.Paragraphs(1).Alignment = wdAlignParagraphRight
This example centers all the rows in the first table in the active document.
ActiveDocument.Tables(1).Rows.Alignment = wdAlignRowCenter
This example centers the first tab stop in the first paragraph in the active document.
ActiveDocument.Paragraphs(1).TabStops(1).Alignment = wdAlignTabCenter