Class TextEffectFormat (Excel VBA)

Contains properties and methods that apply to WordArt objects.

Properties

Alignment returns or sets an MsoTextEffectAlignment value that represents the alignment for 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

FontBold returns msoTrue if the font in the specified WordArt is bold.

Set myDocument = Worksheets(1) 
With myDocument.Shapes(3) 
    If .Type = msoTextEffect Then 
        .TextEffect.FontBold = msoTrue 
    End If 
End With

FontItalic returns msoTrue if the font in the specified WordArt is italic.

Set myDocument = Worksheets(1) 
myDocument.Shapes("WordArt 4").TextEffect.FontItalic = msoTrue

FontName returns or sets the name of the font in the specified WordArt.

Set myDocument = Worksheets(1) 
With myDocument.Shapes(3) 
 If .Type = msoTextEffect Then 
 .TextEffect.FontName = "Courier New" 
 End If 
End With

FontSize returns or sets the font size for the specified WordArt, in points.

Set myDocument = Worksheets(1) 
myDocument.Shapes("WordArt 4").TextEffect.FontSize = 16

KernedPairs returns msoTrue if character pairs in the specified WordArt are kerned.

Set myDocument = Worksheets(1) 
With myDocument.Shapes(3) 
 If .Type = msoTextEffect Then 
 .TextEffect.KernedPairs = msoTrue 
 End If 
End With

NormalizedHeight returns msoTrue if all characters (both uppercase and lowercase) in the specified WordArt are the same height.

Set myDocument = Worksheets(1) 
myDocument.Shapes.AddTextEffect( _ 
 PresetTextEffect:=msoTextEffect1, _ 
 Text:="Test Effect", FontName:="Courier New", _ 
 FontSize:=44, FontBold:=True, _ 
 FontItalic:=False, Left:=10, Top:=10).Name = "texteff1" 
myDocument.Shapes("texteff1").TextEffect.NormalizedHeight = msoTrue

Parent returns the parent object for the specified object. Read-only.

PresetShape returns or sets the shape of the specified WordArt.

Set myDocument = Worksheets(1) 
For Each s In myDocument.Shapes 
 If s.Type = msoTextEffect Then 
 s.TextEffect.PresetShape = msoTextEffectShapeChevronDown 
 End If 
Next

PresetTextEffect returns or sets the style of the specified WordArt.

Set myDocument = Worksheets(1) 
For Each s In myDocument.Shapes 
 If s.Type = msoTextEffect Then 
 s.TextEffect.PresetTextEffect = msoTextEffect1 
 End If 
Next

RotatedChars returns msoTrue if characters in the specified WordArt are rotated 90 degrees relative to the WordArt's bounding shape. Returns msoFalse if characters in the specified WordArt retain their original orientation relative to the bounding shape.

Set myDocument = Worksheets(1) 
Set newWordArt = myDocument.Shapes.AddTextEffect( _ 
 PresetTextEffect:=msoTextEffect1, Text:="Test", _ 
 FontName:="Arial Black", FontSize:=36, _ 
 FontBold:=False, FontItalic:=False, Left:=10, _ 
 Top:=10) 
newWordArt.TextEffect.RotatedChars = msoTrue

Text returns or sets the text for the specified object.

Tracking returns or sets the ratio of the horizontal space allotted to each character in the specified WordArt to the width of the character. Can be a value from 0 (zero) through 5. Large values for this property specify ample space between characters; values less than 1 can produce character overlap.

Set myDocument = Worksheets(1) 
Set newWordArt = myDocument.Shapes.AddTextEffect( _ 
 PresetTextEffect:=msoTextEffect1, Text:="Test", _ 
 FontName:="Arial Black", FontSize:=36, _ 
 FontBold:=False, FontItalic:=False, Left:=100, _ 
 Top:=100) 
newWordArt.TextEffect.Tracking =0.8