Szerkesztés

Megosztás a következőn keresztül:


Shapes.AddTextEffect method (PowerPoint)

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_ )

expression A variable that represents a Shapes object.

Parameters

Name Required/Optional Data type Description
PresetTextEffect Required MsoPresetTextEffect The preset text effect.
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 Determines whether the font used in the WordArt is set to bold.
FontItalic Required MsoTriState Determines whether the font used in the WordArt is set to italic.
Left Required Single The position, measured in points, of the left edge of the WordArt's bounding box relative to the left edge of the slide.
Top Required Single The position, measured in points, of the top edge of the WordArt's bounding box relative to the top edge of the slide.

Return value

Shape

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 WordArt that contains the text "Test" to myDocument.

Set myDocument = ActivePresentation.Slides(1) 
Set newWordArt = myDocument.Shapes _ 
    .AddTextEffect(PresetTextEffect:=msoTextEffect1, _ 
    Text:="Test", FontName:="Arial Black", FontSize:=36, _ 
    FontBold:=msoFalse, FontItalic:=msoFalse, Left:=10, Top:=10)

See also

Shapes Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.