PowerPoint) (GroupShapes 物件
代表群組圖案中的個別圖案。 代表每個圖案的 Shape 物件。 使用 項目 方法搭配這個物件,您可以使用單一圖案群組內不必 ungroup 它們。
範例
使用 GroupItems 屬性可傳回 GroupShapes 集合。 使用 GroupItems (索引) ,其中 index 是群組圖案內的個別圖案數目,可從 GroupShapes 集合傳回單一圖案。 下列範例會在 myDocument 中新增三個三角形、將其組成群組、設定整個群組的色彩,然後單獨變更第二個三角形的色彩。
Set myDocument = ActivePresentation.Slides(1)
With myDocument.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
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。