Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Latest commit

 

History

History
61 lines (35 loc) · 1.69 KB

shapes-addtable-method-powerpoint.md

File metadata and controls

61 lines (35 loc) · 1.69 KB
title keywords f1_keywords ms.prod api_name ms.assetid ms.date
Shapes.AddTable Method (PowerPoint)
vbapp10.chm543027
vbapp10.chm543027
powerpoint
PowerPoint.Shapes.AddTable
77ce193e-10f7-25f4-a6f8-99d7d2b781ad
06/08/2017

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 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