Shapes.AddTextEffect Method
Word Developer Reference |
Adds a WordArt shape to a drawing canvas. Returns a Shape object that represents the WordArt and adds it to the CanvasShapes collection.
Syntax
expression.AddTextEffect(PresetTextEffect, Text, FontName, FontSize, FontBold, FontItalic, Left, Top)
expression Required. A variable that represents a Shapes collection.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
PresetTextEffect | Required | MsoPresetTextEffect | A preset text effect. The values of the MsoPresetTextEffect 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 | MsoTriState | MsoTrue to bold the WordArt font. |
FontItalic | Required | MsoTriState | MsoTrue to italicize the WordArt font. |
Left | Required | Single | The position, measured in points, of the left edge of the WordArt shape relative to the left edge of the drawing canvas. |
Top | Required | Single | The position, measured in points, of the top edge of the WordArt shape relative to the top edge of the drawing canvas. |
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.
Example
This example adds a drawing canvas to a new document and inserts a WordArt shape inside the canvas that contains the text "Hello, World."
Visual Basic for Applications |
---|
|
See Also