Diese Dokumentation wurde archiviert und wird nicht länger gepflegt.

Shapes.AddTextEffect Method

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

Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in microsoft.office.interop.word.dll)

'Usage
Dim PresetTextEffect As MsoPresetTextEffect
Dim Text As String
Dim FontName As String
Dim FontSize As Single
Dim FontBold As MsoTriState
Dim FontItalic As MsoTriState
Dim Left As Single
Dim Top As Single
Dim Anchor As Object
Dim returnValue As Shape
Dim shapes1 As Shapes
returnValue = shapes1.AddTextEffect(PresetTextEffect, Text, FontName, FontSize, FontBold, FontItalic, Left, Top, Anchor)

Shape AddTextEffect(
	[In] MsoPresetTextEffect PresetTextEffect, 
	[In] string Text, 
	[In] string FontName, 
	[In] float FontSize, 
	[In] MsoTriState FontBold, 
	[In] MsoTriState FontItalic, 
	[In] float Left, 
	[In] float Top, 
	[In, Optional] ref object Anchor
);
public Shape AddTextEffect(
	/*in*/MsoPresetTextEffect PresetTextEffect, 
	/*in*/System.String Text, 
	/*in*/System.String FontName, 
	/*in*/float FontSize, 
	/*in*/MsoTriState FontBold, 
	/*in*/MsoTriState FontItalic, 
	/*in*/float Left, 
	/*in*/float Top, 
	/*in*/System.Object Anchor
);
function AddTextEffect(
	 PresetTextEffect : MsoPresetTextEffect, 
	 Text : String, 
	 FontName : String, 
	 FontSize : float, 
	 FontBold : MsoTriState, 
	 FontItalic : MsoTriState, 
	 Left : float, 
	 Top : float, 
	 Anchor : Object
) : Shape;

Parameters

PresetTextEffect

Required Microsoft.Office.Core.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 Microsoft.Office.Core.MsoTriState. MsoTrue to bold the WordArt font.

FontItalic

Required Microsoft.Office.Core.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 anchor.

Top

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

Anchor

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.

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.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Anzeigen: