Alignment Property

Applies To

Phonetic object, TextEffectFormat object.

Description

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 adds a WordArt object to worksheet one and then right aligns the WordArt.

Set mySh = Worksheets(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