Alignment Property
Applies To
ParagraphFormat object, TextEffectFormat object.
Description
ParagraphFormat object: Returns or sets the alignment for each paragraph in the specified paragraph format. Can be one of the following PpParagraphAlignment constants: ppAlignCenter, ppAlignDistribute, ppAlignJustify, ppAlignLeft, ppAlignmentMixed, or ppAlignRight. Read/write Long.
TextEffectFormat object: Returns or sets the alignment for the specified WordArt. Can be one of the following MsoTextEffectAlignment constants: msoTextEffectAlignmentCentered, msoTextEffectAlignmentLeft, msoTextEffectAlignmentLetterJustify, msoTextEffectAlignmentMixed, msoTextEffectAlignmentRight, msoTextEffectAlignmentStretchJustify, or msoTextEffectAlignmentWordJustify. Read/write Long.
Example
This example left aligns the paragraphs in shape two on slide one in the active presentation.
Application.ActivePresentation.Slides(1).Shapes(2).TextFrame.TextRange _
.ParagraphFormat.Alignment = ppAlignLeft
This example adds a WordArt object to slide one in the active presentation and then right aligns the WordArt.
Set mySh = Application.ActivePresentation.Slides(1).Shapes
Set myTE = mySh.AddTextEffect(PresetTextEffect:=msoTextEffect1, _
Text:="Test Text", FontName:="Palatino", FontSize:=54, _
FontBold:=True, FontItalic:=False, Left:=100, Top:=50)
myTE.TextEffect.Alignment = msoTextEffectAlignmentRight