Consulting

Results 1 to 3 of 3

Thread: Replacing one animation type by another using VBA

  1. #1

    Replacing one animation type by another using VBA

    Hi all,

    I'm working on converting a number of my PPT presentations to HTML5 for use online, but unfortunately the programme used for the conversion doesn't support the "Blink" emphasis animation which I use quite extensively (I know it's ugly, but I need it as it's used to flash a rectangle to attract attention in screenshots with a very busy interface).

    Anyway, after consulting with the tech support of the conversion software, keeping the blink animation would need a lot of manual work (basically emulating it with appear-disappear), so I decided to replace it with the "Pulse" animation instead, which is supported by the software.

    As the animation is used extensively, replacing blink by pulse would require a lot of mind-numbingly repetitive manual work, with a risk of errors slipping in there as well, so I was wondering if there is a simple way of using VBA to search through every slide, find the "Blink" animation, and replace it with the "Pulse" animation (in the same place in the timeline, if possible using the same duration and number of repeats).

    If anyone could help me here, you'd be making my life a lot easier, and my August being locked in the office slightly more pleasant

    Thank you in advance,

    -Isa

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Blink is a strange animation and has odd properties (probably why it doesn't convert.)

    Try this but use a copy!


    Sub relaceAni()
    Dim osld As Slide
    Dim oeff As Effect
    Dim L As Long
    For Each osld In ActivePresentation.Slides
    For L = 1 To osld.TimeLine.MainSequence.Count
    Set oeff = osld.TimeLine.MainSequence(L)
    On Error Resume Next
    Err.Clear
    Debug.Print oeff.EffectType
    If Err <> 0 Then
    osld.TimeLine.MainSequence(L).EffectType = 75
    End If
    Next L
    Next osld
    End Sub
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    John, it works perfectly, as always.

    I can't count the number of times you've saved me hours of tedious work here. I'm very grateful for your help, thank you.

    -Isa

Posting Permissions

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