Shape.AutoShapeType property (Word)
Returns or sets the shape type for the specified Shape object, which must represent an AutoShape other than a line or freeform drawing. Read/write MsoAutoShapeType.
Syntax
expression.AutoShapeType
expression Required. A variable that represents a Shape object.
Remarks
When you change the type of a shape, the shape retains its size, color, and other attributes.
Example
This example replaces all 16-point stars with 32-point stars in the active document.
Sub ReplaceAutoShape()
Dim docNew As Document
Dim shpStar As Shape
Set docNew = ActiveDocument
For Each shpStar In docNew.Shapes
If shpStar.AutoShapeType = msoShape16pointStar Then
shpStar.AutoShapeType = msoShape32pointStar
End If
Next
End Sub
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.