Dzwebs.Net

撰写电脑技术杂文十余年

PropertyEffect 对象在VBA中的应用

Admin | 2013-7-12 8:08:30 | 被阅次数 | 4867

温馨提示!

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

  PropertyEffect 对象 

  代表 AnimationBehavior 对象的属性效果。

  使用 PropertyEffect 对象

  使用 AnimationBehavior 对象的 PropertyEffect 属性返回 PropertyEffect 对象。以下示例引用指定动画动作的属性效果。

  ActivePresentation.Slides(1).TimeLine.MainSequence.Item(1).Behaviors(1).PropertyEffect

  使用 Points 属性访问特定动画动作的动画点。如果希望只更改动画动作的两种状态,请使用 From 和 To 属性。以下示例向幻灯片中添加一个新形状,并设置属性效果以将填充颜色动画显示为从蓝到红。

  Sub AddShapeSetAnimFill()

      Dim effBlinds As Effect
      Dim shpRectangle As Shape
      Dim animProperty As AnimationBehavior

      Set shpRectangle = ActivePresentation.Slides(1).Shapes _
        .AddShape(Type:=msoShapeRectangle, Left:=100, _
        Top:=100, Width:=50, Height:=50)
      Set effBlinds = ActivePresentation.Slides(1).TimeLine.MainSequence _
        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectBlinds)

      effBlinds.Timing.Duration = 3

      Set animProperty = effBlinds.Behaviors.Add(msoAnimTypeProperty)

      With animProperty.PropertyEffect
        .Property = msoAnimColor
        .From = RGB(Red:=0, Green:=0, Blue:=255)
        .To = RGB(Red:=255, Green:=0, Blue:=0)
      End With

  End Sub


该杂文来自: PowerPoint杂文

上一篇:PrintRange对象、PrintRanges集合对象的用法与关

下一篇:PublishObject对象与PublishObject 集合

网站备案号:

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

版权属性:

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

联系方式:

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