Table of contents
TOC
折叠目录
展开目录

ShapeRange.GroupItems 属性 (PowerPoint)ShapeRange.GroupItems Property (PowerPoint)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

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

语法Syntax

表达式GroupItemsexpression. GroupItems

表达式_一个表示一个ShapeRange对象的变量。_expression A variable that represents a ShapeRange 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

概念Concepts

绘图对象ShapeRange Object

© 2018 Microsoft