Shape.GroupItems 屬性 (Publisher)
如果指定的圖形是一個群組,則會傳回 GroupShapes 集合。
語法
運算式。GroupItems
表達 代表 Shape 物件的變數。
註解
所有智慧物件都會視為是群組圖案。
範例
本範例首先在出版物中新增三個三角形並組成群組,設定整個群組的色彩後,再單獨改變第二個三角形的色彩。
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
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。