Click to Rate and Give Feedback
MSDN
MSDN Library
Office Development
Office 2003
Reference
Methods
A
 AddShape Method
Collapse All/Expand All Collapse All
PowerPoint 2003 VBA Language Reference
AddShape Method

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

expression.AddShape(Type, Left, Top, Width, Height)

expression    Required. An expression that returns one of the objects in the Applies To list.

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.

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
		




© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker