Table of contents
TOC
Collapse the table of content
Expand the table of content

Shape.GroupItems Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Returns a GroupShapes collection if the specified shape is a group.

Syntax

expression. GroupItems

_expression_A variable that represents a Shape object.

Remarks

All smart objects will be treated as grouped shapes.

Example

This example adds three triangles to a publication, groups them, sets a color for the entire group, and then changes the color for the second triangle only.

Sub Grouper() 

 Dim docSheet As Document 

 Set docSheet = ActiveDocument 
 With docSheet.MasterPages.Item(1).Shapes 
 ' Add the 3 triangles 
 .AddShape(Type:=msoShapeIsoscelesTriangle, _ 
 Left:=10, Top:=10, Width:=100, Height:=100).Name = "shpOne" 
 .AddShape(Type:=msoShapeIsoscelesTriangle, _ 
 Left:=150, Top:=10, Width:=100, Height:=100).Name = "shpTwo" 
 .AddShape(Type:=msoShapeIsoscelesTriangle, _ 
 Left:=300, Top:=10, Width:=100, Height:=100).Name = "shpThree" 
 ' Group and fill the 3 triangles 
 With .Range(Array("shpOne", "shpTwo", "shpThree")).Group 
 .Fill.PresetTextured msoTextureBlueTissuePaper 
 .GroupItems(2).Fill.PresetTextured msoTextureGreenMarble 
 End With 
 End With 

End Sub
© 2018 Microsoft