GroupShapes object (Word)
Represents the individual shapes within a grouped shape. Each shape contained within a group of shapes is represented by a Shape object.
Remarks
Use the GroupItems property to return the GroupShapes collection. Use GroupItems (Index), where Index is the number of the individual shape within the grouped shape, to return a single shape from the GroupShapes collection. The following example adds three triangles to the active document, groups them, sets a color for the entire group, and then changes the color for the second triangle only.
With ActiveDocument.Shapes
.AddShape(msoShapeIsoscelesTriangle, _
10, 10, 100, 100).Name = "shpOne"
.AddShape(msoShapeIsoscelesTriangle, _
150, 10, 100, 100).Name = "shpTwo"
.AddShape(msoShapeIsoscelesTriangle, _
300, 10, 100, 100).Name = "shpThree"
With .Range(Array("shpOne", "shpTwo", "shpThree")).Group
.Fill.PresetTextured msoTextureBlueTissuePaper
.GroupItems(2).Fill.PresetTextured msoTextureGreenMarble
End With
End With
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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for