创建一个自选图形。返回一个代表新自选图形的 Shape 对象。
expression.AddShape(Type, Left, Top, Width, Height)
expression 必选。该表达式返回“应用于”列表中的对象之一。
Type 必选。MsoAutoShapeType 类型。指定要创建的自选图形类型。
| MsoAutoShapeType 可以是下列 MsoAutoShapeType 类型常数之一。 |
| 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 必选。Single 类型。自选图形左边缘相对于幻灯片左边缘的位置(以磅为单位)。
Top 必选。Single 类型。自选图形上边缘相对于幻灯片上边缘的位置(以磅为单位)。
Width 必选。Single 类型。自选图形的宽度(以磅为单位)。
Height 必选。Single 类型。自选图形的高度(以磅为单位)。
若要更改添加的自选图形的类型,请设置 AutoShapeType 属性。
本示例在 myDocument中添加一个矩形。
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddShape Type:=msoShapeRectangle, _
Left:=50, Top:=50, Width:=100, Height:=200