返回或设置指定的 Shape 对象或 ShapeRange 对象的形状类型,该对象必须代表自选图形,而不能是直线、任意多边形或连接符。MsoAutoShapeType 类型,可读写。
注意 更改形状的类型时,形状将保留其大小、颜色和其他属性。
MsoAutoShapeType 可为以下 MsoAutoShapeType 常量之一。 |
msoShape24pointStar |
msoShape4pointStar |
msoShape8pointStar |
msoShapeActionButtonBeginning |
msoShapeActionButtonDocument |
msoShapeActionButtonForwardorNext |
msoShapeActionButtonHome |
msoShapeActionButtonMovie |
msoShapeActionButtonSound |
msoShapeBalloon |
msoShapeBentUpArrow |
msoShapeBlockArc |
msoShapeChevron |
msoShapeCloudCallout |
msoShapeCube |
msoShapeCurvedDownRibbon |
msoShapeCurvedRightArrow |
msoShapeCurvedUpRibbon |
msoShapeDonut |
msoShapeDoubleBracket |
msoShapeDownArrow |
msoShapeDownRibbon |
msoShapeExplosion2 |
msoShapeFlowchartCard |
msoShapeFlowchartConnector |
msoShapeFlowchartDecision |
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 |
msoShapeQuadArrowCallout |
msoShapeRectangularCallout |
msoShapeRightArrow |
msoShapeRightBrace |
msoShapeRightTriangle |
msoShapeRoundedRectangularCallout |
msoShapeStripedRightArrow |
msoShapeTrapezoid |
msoShapeUpArrowCallout |
msoShapeUpDownArrowCallout |
msoShapeUTurnArrow |
msoShapeWave |
msoShape16pointStar |
msoShape32pointStar |
msoShape5pointStar |
msoShapeActionButtonBackorPrevious |
msoShapeActionButtonCustom |
msoShapeActionButtonEnd |
msoShapeActionButtonHelp |
msoShapeActionButtonInformation |
msoShapeActionButtonReturn |
msoShapeArc |
msoShapeBentArrow |
msoShapeBevel |
msoShapeCan |
msoShapeCircularArrow |
msoShapeCross |
msoShapeCurvedDownArrow |
msoShapeCurvedLeftArrow |
msoShapeCurvedUpArrow |
msoShapeDiamond |
msoShapeDoubleBrace |
msoShapeDoubleWave |
msoShapeDownArrowCallout |
msoShapeExplosion1 |
msoShapeFlowchartAlternateProcess |
msoShapeFlowchartCollate |
msoShapeFlowchartData |
msoShapeFlowchartDelay |
msoShapeQuadArrow |
msoShapeRectangle |
msoShapeRegularPentagon |
msoShapeRightArrowCallout |
msoShapeRightBracket |
msoShapeRoundedRectangle |
msoShapeSmileyFace |
msoShapeSun |
msoShapeUpArrow |
msoShapeUpDownArrow |
msoShapeUpRibbon |
msoShapeVerticalScroll |
expression.AutoShapeType
expression 必需。该表达式返回“应用于”列表中的对象之一。
可用 ConnectorFormat 对象的 Type 属性设置或返回连接符的类型。
本示例将 myDocument
中所有的 16 磅星形替换为 32 磅星形。
Set myDocument = Worksheets(1)
For Each s In myDocument.Shapes
If s.AutoShapeType = msoShape16pointStar Then
s.AutoShapeType = msoShape32pointStar
End If
Next