Skip to content

Latest commit

 

History

History
54 lines (28 loc) · 1.68 KB

0c7c6093-48f6-e1f1-1837-e69d6ef13e57.md

File metadata and controls

54 lines (28 loc) · 1.68 KB

Shapes.AddTextbox Method (PowerPoint)

Creates a text box. Returns a Shape object that represents the new text box.

Syntax

expression. AddTextbox( Orientation, Left, Top, Width, Height )

expression A variable that represents a Shapes object.

Parameters

Name Required/Optional Data Type Description
Orientation Required MsoTextOrientation The text orientation. Some of these constants may not be available to you, depending on the language support (U.S. English, for example) that you?ve selected or installed.
Left Required Single The position, measured in points, of the left edge of the text box relative to the left edge of the slide.
Top Required Single The position, measured in points, of the top edge of the text box relative to the top edge of the slide.
Width Required Single The width of the text box, measured in points.
Height Required Single The height of the text box, measured in points.

Return Value

Shape

Example

This example adds a text box that contains the text "Test Box" to myDocument.

Set myDocument = ActivePresentation.Slides(1) 
myDocument.Shapes.AddTextbox(Type:=msoTextOrientationHorizontal, _ 
    Left:=100, Top:=100, Width:=200, Height:=50).TextFrame _ 
    .TextRange.Text = "Test Box"

See also

Concepts

Shapes Object

Other resources

Shapes Object Members