Shapes.AddTextEffect Method

Definition

Adds a WordArt shape to a document. Returns a Shape object that represents the WordArt and adds it to the Shapes collection.

public Microsoft.Office.Interop.Word.Shape AddTextEffect (Microsoft.Office.Core.MsoPresetTextEffect PresetTextEffect, string Text, string FontName, float FontSize, Microsoft.Office.Core.MsoTriState FontBold, Microsoft.Office.Core.MsoTriState FontItalic, float Left, float Top, ref object Anchor);
abstract member AddTextEffect : Microsoft.Office.Core.MsoPresetTextEffect * string * string * single * Microsoft.Office.Core.MsoTriState * Microsoft.Office.Core.MsoTriState * single * single * obj -> Microsoft.Office.Interop.Word.Shape
Public Function AddTextEffect (PresetTextEffect As MsoPresetTextEffect, Text As String, FontName As String, FontSize As Single, FontBold As MsoTriState, FontItalic As MsoTriState, Left As Single, Top As Single, Optional ByRef Anchor As Object) As Shape

Parameters

PresetTextEffect
MsoPresetTextEffect

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
String

Required String. The text in the WordArt.

FontName
String

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

FontSize
Single

Required Single. The size, in points, of the font used in the WordArt.

FontBold
MsoTriState

Required MsoTriState. MsoTrue to bold the WordArt font.

FontItalic
MsoTriState

Required MsoTriState. MsoTrue to italicize the WordArt font.

Left
Single

Required Single. The position, measured in points, of the left edge of the WordArt shape relative to the anchor.

Top
Single

Required Single. The position, measured in points, of the top edge of the WordArt shape relative to the anchor.

Anchor
Object

Optional Object. 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.

Returns

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.

Applies to