AddTextEffect Method

See Also         Example         Applies To

Creates a WordArt object. Returns a Shape object that represents the new WordArt object.

Syntax

expression.AddTextEffect(PresetTextEffect, Text, FontName, FontSize, FontBold, FontItalic, Left, Top, Anchor)

expression   Required. An expression that returns a Shapes collection.

PresetTextEffect   Required Long. A preset text effect. Can be one of the following MsoPresetTextEffect constants.

msoTextEffect1

msoTextEffect2

msoTextEffect3

msoTextEffect4

msoTextEffect5

msoTextEffect6

msoTextEffect7

msoTextEffect8

msoTextEffect9

msoTextEffect10

msoTextEffect11

msoTextEffect12

msoTextEffect13

msoTextEffect14

msoTextEffect15

msoTextEffect16

msoTextEffect17

msoTextEffect18

msoTextEffect19

msoTextEffect20

msoTextEffect21

msoTextEffect22

msoTextEffect23

msoTextEffect24

msoTextEffect25

msoTextEffect26

msoTextEffect27

msoTextEffect28

msoTextEffect29

msoTextEffect30


The values of these constants correspond to the formats listed in the WordArt Gallery dialog box (numbered from left to right and from top to bottom).

Text   Required String. The text in the WordArt.

FontName   Required String. The name of the font used in the WordArt.

FontSize   Required Single. The size (in points) of the font used in the WordArt.

FontBold   Required Long. True to set the font used in the WordArt to bold.

FontItalic   Required Long. True to set the font used in the WordArt to italic.

Left, Top   Required Single. The position (in points) of the upper-left corner of the WordArt's bounding box, relative to the anchor

Anchor   Optional Variant. A Range object that represents the text to which the WordArt is bound. If Anchor is specified, the anchor is positioned at the beginning of the first paragraph in the anchoring range. If this argument is omitted, the anchoring range is selected automatically and the WordArt is positioned relative to the top and left edges of the page.

Remarks

When you add WordArt to a document, the height and width of the WordArt are automatically set based on the size and amount of text you specify.