Consulting

Results 1 to 4 of 4

Thread: Not configure animation order in powerpoint using vba

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

    Not configure animation order in powerpoint using vba

    Hi, Sir
    Need some help.
    I can easily move animation order from animation pane by using up/down. But is it possible through vba code ?
    I upload two images(1st one for initial & 2nd one is require result & used afterprevious effect) for better understanding. Any solution will be highly appreciated.
    Attached Images Attached Images

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    You will need to probably work on this but the basic principle is:

    Sub Move_ani()
        Dim osld   As Slide
        Dim oeff   As Effect
        On Error GoTo err:
        Set osld = ActiveWindow.Selection.SlideRange(1)
        For Each oeff In osld.TimeLine.MainSequence
            If oeff.Shape.Name = "image_logo" Then
    'example move up 4
                oeff.MoveTo oeff.Index - 4
            End If
        Next oeff
        Exit Sub
    err:
        MsgBox err.Description
    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. Now working as I wanted. Sir I have one question, if there are three animation for the selected shape then I have to select according to the animation type ie if oeff.EffectType = msoAnimEffectSpin then

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Yes, or maybe duration or some other aspect as well.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

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
  •