Consulting

Results 1 to 14 of 14

Thread: Swap animation with vba

Threaded View

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

    Swap animation with vba

    Sir Paul_Hossler

    Need a little help.
    I want to swap my entrance animation with the help of vba. I have a group(rectangle & textbox) & want to swap its entrance FloatIn animation to Spinner animation. I run the following code but not working.
    For better understand please see the example presentation.

    Sub animationswap()
    Dim osld As Slide
    Dim i As Integer
    Dim oeff As Effect
    Dim gshp As Shape
    Set osld = ActivePresentation.Slides(1)
    For j = 1 To 4
    Set gshp = osld.Shapes("Group" & j)
    
    
    For i = 1 To osld.TimeLine.MainSequence.Count
      If osld.TimeLine.MainSequence(i).Shape.Id = gshp.Id Then
         If osld.TimeLine.MainSequence(i).EffectType = msoAnimEffectFloat Then
             Set oeff = osld.TimeLine.MainSequence(i)
                 oeff.EffectType = msoAnimEffectSpin 
         End If
      End If
    Next i
    Next j
    End Sub
    Attached Files Attached Files
    Last edited by Paul_Hossler; 06-11-2021 at 08:28 AM. Reason: Added CODE tags

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
  •