PowerPoint VBA教程:AnimationPoint对象

   
AnimationPoints
AnimationPoint

代表动画动作的单个动画点。AnimationPoint对象是AnimationPoints集合的成员。AnimationPoints集合包含动画动作的所有动画点。

使用 AnimationPoint对象

若要添加或引用 AnimationPoint对象,请分别使用AddItem方法。使用 AnimationPoint对象的Time属性设置动画点之间的计时。使用Value属性设置其他动画点属性,如颜色。以下示例在当前演示文稿的主动画序列的第一个动作中添加三个动画点,然后更改每个动画点的颜色。


Sub AniPoint()
    Dim sldNewSlide As Slide
    Dim shpHeart As Shape
    Dim effCustom As Effect
    Dim aniBehavior As AnimationBehavior
    Dim aptNewPoint As AnimationPoint
    Set sldNewSlide = ActivePresentation.Slides.Add _
        (Index:=1, Layout:=ppLayoutBlank)
    Set shpHeart = sldNewSlide.Shapes.AddShape _
        (Type:=msoShapeHeart, Left:=100, Top:=100, _
        Width:=200, Height:=200)
    Set effCustom = sldNewSlide.TimeLine.MainSequence _
        .AddEffect(shpHeart, msoAnimEffectCustom)
    Set aniBehavior = effCustom.Behaviors.Add(msoAnimTypeProperty)
    With aniBehavior.PropertyEffect
        .Property = msoAnimShapeFillColor
        Set aptNewPoint = .Points.Add
        aptNewPoint.Time = 0.2
        aptNewPoint.Value = RGB(0, 0, 0)
        Set aptNewPoint = .Points.Add
        aptNewPoint.Time = 0.5
        aptNewPoint.Value = RGB(0, 255, 0)
        Set aptNewPoint = .Points.Add
        aptNewPoint.Time = 1
        aptNewPoint.Value = RGB(0, 255, 255)
    End With
End Sub

上页:PowerPoint VBA教程:AnimationBehaviors集合 下页:PowerPoint VBA教程:AnimationPoints集合

PowerPoint VBA教程:AnimationPoint对象

PowerPoint VBA教程:AnimationPoints集合 PowerPoint VBA教程:AnimationSettings对象
PowerPoint VBA教程:Application对象 PowerPoint VBA教程:AutoCorrect对象
PowerPoint VBA教程:Borders集合对象 PowerPoint VBA教程:BulletFormat对象
PowerPoint VBA教程:CalloutFormat对象 PowerPoint VBA教程:Cell对象
PowerPoint VBA教程:CellRange集合对象 PowerPoint VBA教程:ColorEffect对象
PowerPoint VBA教程:ColorFormat对象 PowerPoint VBA教程:ColorScheme对象
PowerPoint VBA教程:ColorSchemes集合对象 PowerPoint VBA教程:Column对象
PowerPoint VBA教程:Columns集合对象 PowerPoint VBA教程:Comment对象
PowerPoint VBA教程:Comments集合 PowerPoint VBA教程:ConnectorFormat对象
PowerPoint VBA教程:DefaultWebOptions对象 PowerPoint VBA教程:Design对象
版权所有 © 中山市飞娥软件工作室 证书:粤ICP备09170368号