Table of contents
TOC
Collapse the table of content
Expand the table of content

Shapes.AddTable Method (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

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

NameRequired/OptionalData TypeDescription
NumRowsRequiredLongThe number of rows in the table.
NumColumnsRequiredLongThe number of columns in the table.
LeftOptionalSingleThe distance (in points) from the left edge of the slide to the left edge of the table.
TopOptionalSingleThe distance (in points) from the top edge of the slide to the top edge of the table.
WidthOptionalSingleThe width (in points) of the new table.
HeightOptionalSingleThe 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 is 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

Concepts

Shapes Object

© 2018 Microsoft