EffectParameters.Color2 property (PowerPoint)

Returns a ColorFormat object that represents the color on which to end a color-cycle animation.


expression. Color2

expression A variable that represents an EffectParameters object.

Return value



The following example adds a shape, adds a fill animation to that shape, then reports the starting and ending fill colors.

Sub SetStartEndColors()

    Dim effChangeFill As Effect
    Dim shpCube As Shape
    Dim a As AnimationBehavior

    'Adds cube and set fill effect
    Set shpCube = ActivePresentation.Slides(1).Shapes _
        .AddShape(Type:=msoShapeCube, Left:=300, _
        Top:=300, Width:=100, Height:=100)

    Set effChangeFill = ActivePresentation.Slides(1).TimeLine _
        .MainSequence.AddEffect(Shape:=shpCube, _

    'Sets duration of effect and displays a message containing
    'the starting and ending colors for the fill effect
    effChangeFill.Timing.Duration = 3
    MsgBox "Start Color = " & effChangeFill.EffectParameters _
        .Color1 & vbCrLf & "End Color = " & effChangeFill _

End Sub

See also

EffectParameters Object

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.