Shapes.AddTable method (PowerPoint)
Adds a table shape to a slide.
Syntax
expression. AddTable
( _NumRows_
, _NumColumns_
, _Left_
, _Top_
, _Width_
, _Height_
)
expression A variable that represents a Shapes object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
NumRows | Required | Long | The number of rows in the table. |
NumColumns | Required | Long | The number of columns in the table. |
Left | Optional | Single | The distance (in points) from the left edge of the slide to the left edge of the table. |
Top | Optional | Single | The distance (in points) from the top edge of the slide to the top edge of the table. |
Width | Optional | Single | The width (in points) of the new table. |
Height | Optional | Single | The height (in points) of the new table. |
Return value
Shape
Example
This example creates a new table on slide two of the active presentation. The table has three rows and four columns. It's 10 points from the left edge of the slide, and 10 points from the top edge. The width of the new table is 288 points, which makes each of the four columns one inch wide (there are 72 points per inch). The height is set to 216 points, which makes each of the three rows one inch tall.
ActivePresentation.Slides(2).Shapes.AddTable(3, 4, 10, 10, 288, 216)
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 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기