[求助]在ppt里能用VBA来改变自定义动画的触发器吗?
ppt里的自定义动画是事先指定好由某个对象触发的,那用VBA可以改变触发的对象吗?可以的话,大概代码什么样呢? vba帮助中的一段:
以下示例向幻灯片添加两个形状,并对该形状添加动画,然后在单击其他形状后开始动画。
Sub AddShapeSetTiming() Dim effDiamond As Effect Dim shpRectangle As Shape Set shpOval = _ ActivePresentation.Slides(1).Shapes. _ AddShape(Type:=msoShapeOval, Left:=400, Top:=100, Width:=100, Height:=50) Set shpRectangle = ActivePresentation.Slides(1).Shapes._ AddShape(Type:=msoShapeRectangle, Left:=100, Top:=100, Width:=50, Height:=50) Set effDiamond = ActivePresentation.Slides(1).TimeLine. _ InteractiveSequences.Add().AddEffect(Shape:=shpRectangle,_ effectId:=msoAnimEffectPathDiamond, trigger:=msoAnimTriggerOnShapeClick) With effDiamond.Timing .Duration = 5 .TriggerShape = shpOval End WithEnd Sub
页:
[1]