AnimationBehavior.SetEffect property (PowerPoint)
Returns a SetEffect object for the animation behavior. Read-only.
Syntax
expression. SetEffect
expression A variable that represents a AnimationBehavior object.
Return value
SetEffect
Remarks
Use the SetEffect object returned to set the value of a property.
Example
The following example adds a shape to the first slide of the active presentation and sets a set effect animation behavior.
Sub ChangeSetEffect()
Dim sldFirst As Slide
Dim shpHeart As Shape
Dim effNew As Effect
Dim bhvEffect As AnimationBehavior
Set sldFirst = ActivePresentation.Slides(1)
Set shpHeart = sldFirst.Shapes.AddShape(Type:=msoShapeHeart, _
Left:=100, Top:=100, Width:=100, Height:=100)
Set effNew = sldFirst.TimeLine.MainSequence.AddEffect _
(Shape:=shpHeart, EffectID:=msoAnimEffectChangeFillColor, _
Trigger:=msoAnimTriggerAfterPrevious)
Set bhvEffect = effNew.Behaviors.Add(msoAnimTypeSet)
With bhvEffect.SetEffect
.Property = msoAnimShapeFillColor
.To = RGB(Red:=0, Green:=255, Blue:=255)
End With
End Sub
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for