SetEffect Interface
Represents a set effect for an animation behavior. You can use the SetEffect object to set the value of a property.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
<GuidAttribute("914934F1-5A91-11CF-8700-00AA0060263B")> _
Public Interface SetEffect
'Usage
Dim instance As SetEffect
[GuidAttribute("914934F1-5A91-11CF-8700-00AA0060263B")]
public interface SetEffect
Remarks
Use the SetEffect property of the AnimationBehavior object to return a SetEffect object. Set effects can be changed using the SetEffect object's Property and To properties.
Examples
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