Dzwebs.Net

撰写电脑技术杂文十余年

ppt vba之GroupShapes形状集合对象

Admin | 2013-5-19 9:41:29 | 被阅次数 | 10035

温馨提示!

如果未能解决您的问题,请点击搜索;登陆可复制文章,点击登陆

  GroupShapes集合对象:代表形状组中的单个形状。

  每个形状由一个 Shape 对象代表。

  对本对象使用Item方法,就可以使用形状组中的单个形状而无须对它们取消组合。

  如何使用 Groupshapes 集合

  使用 GroupItems 属性返回 GroupShapes 集合。

  使用 GroupItems(index) 返回 GroupShapes 集合中的单个形状,其中 index 是组合形状中单个形状的数目。

  以下示例向 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


该杂文来自: PowerPoint杂文

上一篇:PPT制作水晶立体图形

下一篇:ppt忽略某种幻灯片的放映怎么设置

网站备案号:

网站备案号:滇ICP备11001339号-7

版权属性:

Copyright 2007-2021-forever Inc. all Rights Reserved.

联系方式:

Email:dzwebs@126.com QQ:83539231 访问统计