Share via


Alignment Property

Alignment property as it applies to the TextEffectFormat object.

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.

Alignment property as it applies to the ParagraphFormat object.

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

As 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

As 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

Applies to | ParagraphFormat Object | TextEffectFormat Object