AddTextbox Method
Applies To
Shapes collection object.
Description
Creates a text box. Returns a Shape object that represents the new text box.
Syntax
expression.AddTextbox(Orientation, Left, Top, Width, Height)
expression Required. An expression that returns a Shapes object.
Orientation Required Long. The text orientation within the label.Can be either of the following MsoTextOrientation constants: msoTextOrientationHorizontal or msoTextOrientationVerticalFarEast. (Don't use any MsoTextOrientation constant other than these in U.S. English versions of PowerPoint.)
Left, Top Required Single. The position (in points) of the upper-left corner of the text box relative to the upper-left corner of the document.
Width, Height Required Single. The width and height of the text box, in points.
See Also
AddLabel method.
Example
This example adds a text box that contains the text "Test Box" to myDocument.
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 100, 100, _
200, 50) .TextFrame.TextRange.Text = "Test Box"