[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Powerpoint Macro

Posted on 2011-02-20
5
Medium Priority
?
981 Views
Last Modified: 2012-06-27
I need to be able to move forward and backward in the slide show

I have managed to work out that  

ActivePresentation.SlideShowWindow.View.Next
and
ActivePresentation.SlideShowWindow.View.Previous

will move forward and back one slide

can anyone tell me the code required to

a) Move forward 2 slides  (eg if on slide 2 go to slide 4, if on slide 3 to to slide 5) - it needs to be generic and work on any slide
b) Move back 2 slides opposite of above
c) determine which number slide is currently displayed
d) determine number of slides in the presentation

Many thanks
0
Comment
Question by:KCTS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 23

Accepted Solution

by:
JSRWilson earned 2000 total points
ID: 34937567
First of all that's not exactly what they do - it moves to the next / previous build (not the same thing)

Here's what you need:


Sub Report_In()
Dim lngNum As Long
lngNum = ActivePresentation.SlideShowWindow.View.CurrentShowPosition
'forward 2
ActivePresentation.SlideShowWindow.View.GotoSlide (lngNum + 2)
'back 2
ActivePresentation.SlideShowWindow.View.GotoSlide (lngNum - 2)
'current slide
MsgBox "You are on slide " & lngNum
'Number of slides
MsgBox "There are " & ActivePresentation.Slides.Count
End Sub

Open in new window

0
 
LVL 70

Author Comment

by:KCTS
ID: 34940993
Thats great - can you please explain what the difference is between next/previous build and next/previous slide ?
0
 
LVL 23

Expert Comment

by:JSRWilson
ID: 34941596
If you have a slide with say six animations (on click) and you are animation 4. Then the next build is animation 5 NOT the next slide.

If there are no animations then you will always go to the next slide
0
 
LVL 70

Author Comment

by:KCTS
ID: 34941698
Thanks for that clarification.

0
 
LVL 70

Author Closing Comment

by:KCTS
ID: 34941707
Excellent answer with detailed explanation
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
New style of hardware planning for Microsoft Exchange server.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question