AnimationPoint Interface
Represents an individual animation point for an animation behavior. The AnimationPoint object is a member of the AnimationPoints collection. The AnimationPoints collection contains all the animation points for an animation behavior.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
<GuidAttribute("914934EB-5A91-11CF-8700-00AA0060263B")> _
Public Interface AnimationPoint
'Usage
Dim instance As AnimationPoint
[GuidAttribute("914934EB-5A91-11CF-8700-00AA0060263B")]
public interface AnimationPoint
Examples
To add or reference an AnimationPoint object, use the Add(Int32) or Item[Int32] method, respectively. Use the TimeLine property of an AnimationPoint object to set timing between animation points. Use the [Value#SameCHM] property to set other animation point properties, such as color. The following example adds three animation points to the first behavior in the active presentation's main animation sequence, and then it changes colors at each animation point.
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