返回 ColorFormat 对象,该对象代表颜色循环动画的结束颜色。
expression.Color2
expression 必选。该表达式返回“应用于”列表中的对象之一。
Color1 属性返回起始颜色。
以下示例添加一个形状,并向该形状添加填充动画,然后报告起始填充颜色和结束填充颜色。
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, _
effectId:=msoAnimEffectChangeFillColor)
'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 _
.EffectParameters.Color2
End Sub