Alignment Property

Microsoft PowerPoint Visual Basic

ShowAlignment property as it applies to the TextEffectFormat object.

Returns or sets the alignment for the specified WordArt. Read/write MsoTextEffectAlignment.

MsoTextEffectAlignment can be one of these MsoTextEffectAlignment constants.
msoTextEffectAlignmentCentered
msoTextEffectAlignmentLeft
msoTextEffectAlignmentMixed
msoTextEffectAlignmentRight
msoTextEffectAlignmentStretchJustify
msoTextEffectAlignmentWordJustify
msoTextEffectAlignmentLetterJustify

expression.Alignment

expression    Required. An expression that returns a TextEffectFormat object.

ShowAlignment property as it applies to the ParagraphFormat object.

Returns or sets the alignment for each paragraph in the specified paragraph format. Read/write PpParagraphAlignment.

PpParagraphAlignment can be one of these PpParagraphAlignment constants.
ppAlignCenter
ppAlignDistribute
ppAlignJustify
ppAlignJustifyLow
ppAlignLeft
ppAlignmentMixed
ppAlignRight
ppAlignThaiDistribute

expression.Alignment

expression    Required. An expression that returns a ParagraphFormat object.

Example

ShowAs it applies to the TextEffectFormat object.

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
				

ShowAs it applies to the ParagraphFormat object.

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