Skip to content

Latest commit

 

History

History
65 lines (38 loc) · 1.65 KB

PowerPoint.Shapes.AddShape.md

File metadata and controls

65 lines (38 loc) · 1.65 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Shapes.AddShape method (PowerPoint)
vbapp10.chm543012
vbapp10.chm543012
PowerPoint.Shapes.AddShape
2bc6cce5-3461-61ff-083d-bd36ee71cb59
06/08/2017
medium

Shapes.AddShape method (PowerPoint)

Creates an AutoShape. Returns a Shape object that represents the new AutoShape.

Syntax

expression. AddShape( _Type_, _Left_, _Top_, _Width_, _Height_ )

expression A variable that represents a Shapes object.

Parameters

Name Required/Optional Data type Description
Type Required MsoAutoShapeType Specifies the type of AutoShape to create.
Left Required Single The position, measured in points, of the left edge of the AutoShape relative to the left edge of the slide.
Top Required Single The position, measured in points, of the top edge of the AutoShape relative to the top edge of the slide.
Width Required Single The width of the AutoShape, measured in points.
Height Required Single The height of the AutoShape, measured in points.

Return value

Shape

Remarks

To change the type of an AutoShape that you've added, set the AutoShapeType property.

Example

This example adds a rectangle to myDocument.

Set myDocument = ActivePresentation.Slides(1) 
myDocument.Shapes.AddShape Type:=msoShapeRectangle, _ 
    Left:=50, Top:=50, Width:=100, Height:=200

See also

Shapes Object

[!includeSupport and feedback]