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.
MsoAutoShapeType
MsoAutoShapeType can be one of these MsoAutoShapeType constants. |
msoShapeFlowchartConnector |
msoShapeFlowchartData |
msoShapeFlowchartDecision |
msoShapeFlowchartDelay |
msoShapeFlowchartDirectAccessStorage |
msoShapeFlowchartDisplay |
msoShapeFlowchartDocument |
msoShapeFlowchartExtract |
msoShapeFlowchartInternalStorage |
msoShapeFlowchartMagneticDisk |
msoShapeFlowchartManualInput |
msoShapeFlowchartManualOperation |
msoShapeFlowchartMerge |
msoShapeFlowchartMultidocument |
msoShapeFlowchartOffpageConnector |
msoShapeFlowchartOr |
msoShapeFlowchartPredefinedProcess |
msoShapeFlowchartPreparation |
msoShapeFlowchartProcess |
msoShapeFlowchartPunchedTape |
msoShapeFlowchartSequentialAccessStorage |
msoShapeFlowchartSort |
msoShapeFlowchartStoredData |
msoShapeFlowchartSummingJunction |
msoShapeFlowchartTerminator |
msoShapeFoldedCorner |
msoShapeHeart |
msoShapeHexagon |
msoShapeHorizontalScroll |
msoShapeIsoscelesTriangle |
msoShapeLeftArrow |
msoShapeLeftArrowCallout |
msoShapeLeftBrace |
msoShapeLeftBracket |
msoShapeLeftRightArrow |
msoShapeLeftRightArrowCallout |
msoShapeLeftRightUpArrow |
msoShapeLeftUpArrow |
msoShapeLightningBolt |
msoShapeLineCallout1 |
msoShapeLineCallout1AccentBar |
msoShapeLineCallout1BorderandAccentBar |
msoShapeLineCallout1NoBorder |
msoShapeLineCallout2 |
msoShapeLineCallout2AccentBar |
msoShapeLineCallout2BorderandAccentBar |
msoShapeLineCallout2NoBorder |
msoShapeLineCallout3 |
msoShapeLineCallout3AccentBar |
msoShapeLineCallout3BorderandAccentBar |
msoShapeLineCallout3NoBorder |
msoShapeLineCallout4 |
msoShapeLineCallout4AccentBar |
msoShapeLineCallout4BorderandAccentBar |
msoShapeLineCallout4NoBorder |
msoShapeMixed |
msoShapeMoon |
msoShapeNoSymbol |
msoShapeNotchedRightArrow |
msoShapeNotPrimitive |
msoShapeOctagon |
msoShapeOval |
msoShapeOvalCallout |
msoShapeParallelogram |
msoShapePentagon |
msoShapePlaque |
msoShapeQuadArrow |
msoShapeQuadArrowCallout |
msoShapeRectangle |
msoShapeRectangularCallout |
msoShapeRegularPentagon |
msoShapeRightArrow |
msoShapeRightArrowCallout |
msoShapeRightBrace |
msoShapeRightBracket |
msoShapeRightTriangle |
msoShapeRoundedRectangle |
msoShapeRoundedRectangularCallout |
msoShapeSmileyFace |
msoShapeStripedRightArrow |
msoShapeSun |
msoShapeTrapezoid |
msoShapeUpArrow |
msoShapeUpArrowCallout |
msoShapeUpDownArrow |
msoShapeUpDownArrowCallout |
msoShapeUpRibbon |
msoShapeUTurnArrow |
msoShapeVerticalScroll |
msoShapeWave |
msoShapeFlowchartCollate |
msoShape16pointStar |
msoShape24pointStar |
msoShape32pointStar |
msoShape4pointStar |
msoShape5pointStar |
msoShape8pointStar |
msoShapeActionButtonBackorPrevious |
msoShapeActionButtonBeginning |
msoShapeActionButtonCustom |
msoShapeActionButtonDocument |
msoShapeActionButtonEnd |
msoShapeActionButtonForwardorNext |
msoShapeActionButtonHelp |
msoShapeActionButtonHome |
msoShapeActionButtonInformation |
msoShapeActionButtonMovie |
msoShapeActionButtonReturn |
msoShapeActionButtonSound |
msoShapeArc |
msoShapeBalloon |
msoShapeBentArrow |
msoShapeBentUpArrow |
msoShapeBevel |
msoShapeBlockArc |
msoShapeCan |
msoShapeChevron |
msoShapeCircularArrow |
msoShapeCloudCallout |
msoShapeCross |
msoShapeCube |
msoShapeCurvedDownArrow |
msoShapeCurvedDownRibbon |
msoShapeCurvedLeftArrow |
msoShapeCurvedRightArrow |
msoShapeCurvedUpArrow |
msoShapeCurvedUpRibbon |
msoShapeDiamond |
msoShapeDonut |
msoShapeDoubleBrace |
msoShapeDoubleBracket |
msoShapeDoubleWave |
msoShapeDownArrow |
msoShapeDownArrowCallout |
msoShapeDownRibbon |
msoShapeExplosion1 |
msoShapeExplosion2 |
msoShapeFlowchartAlternateProcess |
msoShapeFlowchartCard |
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
Applies to | Shapes Collection Object