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 have 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(Orientation:=msoTextOrientationHorizontal, _
Left:=100, Top:=100, Width:=200, Height:=50).TextFrame _
.TextRange.Text = "Test Box"
See also
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.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기