AutoShapeType Property
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
MsoAutoShapeType
MsoAutoShapeType can be one of these MsoAutoShapeType constants. |
msoShapeMoon |
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 |
msoShapeFlowchartCollate |
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 |
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 |
expression.AutoShapeType
expression Required. An expression that returns one of the objects in the Applies To list.
Remarks
AutoShapes correspond to Microsoft Publisher Shape objects, although the AutoShapeType property for non-Publisher shapes will also return a value. WordArt, OLE, Web Form control, table and picture frame objects should return msoShapeMixed as their AutoShapeType property value. Text frames should return msoShapeRectangle as their AutoShapeType property.
Example
This example converts the selected AutoShape object to a lightning bolt if it is a heart and to a 5-point star if it is not. For this example to execute properly, you must have an AutoShape object selected in the active publication.
Sub ShapeShift()
Dim srShift As ShapeRange
Set srShift = Application.ActiveDocument.Selection.ShapeRange
If srShift.AutoShapeType = msoShapeHeart Then
srShift.AutoShapeType = msoShapeLightningBolt
Else
srShift.AutoShapeType = msoShape5pointStar
End If
End Sub