Consulting

Results 1 to 2 of 2

Thread: How to go to slide and run animation?

  1. #1

    Question How to go to slide and run animation?

    Using VBA, I need to go to a particular slide and run the first animation which is set to run "On click."
    Below is the code I've got so far. It runs the PowerPoint show and goes to slide 5, but SendKeys "{DOWN}" doesn't run the first animation.
    Any suggestions?

    Sub LoadSlideAndRunAnimation()
      Application.Activate
      ActiveWindow.Panes(1).Activate
      Windows(1).View.GoToSlide 5
      ActivePresentation.SlideShowSettings.Run
      SlideShowWindows(1).View.GoToSlide 5
      SlideShowWindows(1).Activate
      SendKeys "{DOWN}"
    End Sub
    I'm working with PowerPoint 2010 on Windows 10.

  2. #2
    OK, so the Next method isn't just for slides. It's also for animations. Here's the code that works:

          Application.Activate
          ActiveWindow.Panes(1).Activate
          Windows(1).View.GoToSlide slideNum
          ActivePresentation.SlideShowSettings.Run
          SlideShowWindows(1).View.GoToSlide slideNum
          SlideShowWindows(1).View.Next

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
  •