Consulting

Results 1 to 4 of 4

Thread: Change Font Color animation not working properly

  1. #1
    VBAX Regular
    Joined
    Sep 2020
    Location
    https://t.me/pump_upp
    Posts
    40
    Location

    Change Font Color animation not working properly

    Sir Need some help..
    I want to use change font color animation in my project so that text color change from white to green.
    But it don't work all times and sometimes changed to orange color instead of green. I search web a lot & do not find correct answer.
    When analysis I found that most of the time after running the code it turns to orange but when check with vba code the color code shows its green.
    I think powerpoint sometimes not able to update the color after running the code. So how can I get desire result i.e. changed to green color.
    Any solution will be highly appreciate.
    The code I have tried:

    Sub changeColor()
    
    
    Dim osld As Slide
    Dim shpTop As Shape
    Dim oeff As Effect
    Set osld = ActivePresentation.Slides(1)
    Set shpTop = osld.Shapes("Text_1")
    Set oeff = osld.TimeLine.MainSequence.AddEffect(Shape:=shpTop, effectid:=msoAnimEffectChangeFontColor, trigger:=msoAnimTriggerNone)
            oeff.EffectParameters.Color2 = RGB(0, 255, 0)
            oeff.Timing.TriggerType = msoAnimTriggerWithPrevious
            oeff.Timing.TriggerDelayTime = 1
            oeff.Timing.Duration = 0.5
    
    
    End Sub

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Your code works for me BUT ....

    If you use ChangeFontColor manually you can set the effect to be NOT cycle through another color before going green. In code as far as I know you cannot specify this. Why not try the Brush On Color effect instead?

    Sub changeColor()
    Dim osld As Slide
    Dim shpTop As Shape
    Dim oeff As Effect
    Set osld = ActivePresentation.Slides(1)
    Set shpTop = osld.Shapes("Text_1")
    Set oeff = osld.TimeLine.MainSequence.AddEffect(Shape:=shpTop, effectid:=msoAnimEffectBrushOnColor, trigger:=msoAnimTriggerWithPrevious)
            oeff.EffectParameters.Color2 = RGB(0, 255, 0)
            oeff.Timing.TriggerDelayTime = 1
            oeff.Timing.Duration = 0.5
    End Sub
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Regular
    Joined
    Sep 2020
    Location
    https://t.me/pump_upp
    Posts
    40
    Location
    Thanks Sir, You save me lot of time & I lost hope to implement those animation but you give what a easy solution. May god bless you.

  4. #4
    VBAX Regular
    Joined
    Sep 2020
    Location
    https://t.me/pump_upp
    Posts
    40
    Location
    Sir, now got the same problem i.e. change to default color when we repeat the code. Any other solution sir. Because I need to change color after animation. Thanks in advance.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •