Publisher (的 GroupShapes 物件)
代表群組圖案中的個別圖案。 代表每個圖案的 Shape 物件。 使用 項目 方法搭配這個物件,您可以使用單一圖案群組內不必 ungroup 它們。
註解
使用 Shape.GroupItems 屬性可傳回 GroupShapes 集合。 使用 GroupItems (索引) ,其中 index 是群組圖案內的個別圖案數目,可從 GroupShapes 集合傳回單一圖案。
範例
下列範例會將三個三角形新增至使用中文件、 三角形,為整個群組設定色彩,然後變更第三個三角形的色彩。
Sub WorkWithGroupShapes()
With ActiveDocument.Pages.Add(Count:=1, After:=1).Shapes
.AddShape(msoShapeIsoscelesTriangle, _
50, 50, 100, 100).Name = "shpOne"
.AddShape(msoShapeIsoscelesTriangle, _
200, 50, 100, 100).Name = "shpTwo"
.AddShape(msoShapeIsoscelesTriangle, _
350, 50, 100, 100).Name = "shpThree"
With .Range(Array("shpOne", "shpTwo", "shpThree")).Group
.Fill.PresetTextured PresetTexture:=msoTextureBlueTissuePaper
.GroupItems(3).Fill.PresetTextured _
PresetTexture:=msoTextureGreenMarble
End With
End With
End Sub
方法
屬性
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應