GroupItems 属性 (PowerPoint)Shape.GroupItems property (PowerPoint)

返回一个**GroupShapes** 对象, 该对象代表指定组中的单个形状。Returns a GroupShapes object that represents the individual shapes in the specified group. 使用 GroupShapes 对象的 Item 方法可返回组中的单个形状。Use the Item method of the GroupShapes object to return a single shape from the group. 此为只读属性。Read-only.

语法Syntax

expressionexpression. GroupItems

_表达式_一个代表**Shape** 对象的变量。expression A variable that represents a Shape object.

返回值Return value

GroupShapesGroupShapes

示例Example

本示例向_myDocument_中添加三个三角形, 将它们组合在一起, 设置整个组的颜色, 然后只更改第二个三角形的颜色。This example adds three triangles to myDocument, groups them, sets a color for the entire group, and then changes the color for the second triangle only.

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

另请参阅See also

形状对象Shape Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.