Powerpoint vba:如何按组名获取一组形状

时间:2013-10-29 17:32:01

标签: powerpoint powerpoint-vba

我已将多个形状分组到一个组中并为该组命名。

ShapesList("Shape 1", "Shape 2", "Shape 3")

set grp = ActivePresentation.Slides(SlidesName).Shapes.Range(ShapesList).Group
grp.Name = "GroupA"

然后我可以得到grp?

set grp = ActivePresentation.Slides(SlidesName).Shapes.Range("GroupA") 'any method to do this?

1 个答案:

答案 0 :(得分:1)

您不需要.Range。试试这个

Dim grp As Shape

Set grp = ActivePresentation.Slides(SlidesName).Shapes("GroupA")