1

我正在使用 PowerPoint 2010,我正在尝试向一堆形状添加动画,这些形状会将它们的颜色变为绿色,但我得到的只是颜色变为深红色

Private Sub CommandButton1_Click()
Dim oshp As Shape
Dim oslide As Slide

Set oslide = ActivePresentation.Slides(1)

'Clear all animations
For i = 1 To oslide.TimeLine.MainSequence.Count
    oslide.TimeLine.MainSequence.Item(1).Delete
Next

For i = 1 To 4
    Set oshp = oslide.Shapes(i)
    ' Assign an animation to shape
    Set oEffect = oslide.TimeLine.MainSequence.AddEffect(Shape:=oshp, effectId:=msoAnimEffectChangeFillColor, trigger:=msoAnimTriggerAfterPrevious)
    oEffect.EffectParameters.Color2.RGB = RGB(0, 255, 0)
    oEffect.Timing.SmoothEnd = msoTrue
    oEffect.Timing.Duration = 0.2
Next
End Sub
4

0 回答 0