Want next slide to be random

  • Thread starter Thread starter Peter Felhofer
  • Start date Start date
P

Peter Felhofer

I want to setup a show where slide #10 is a random one
from a range (say 30-39). I'm guessing there's
something I can do with VBA but not sure how to start.
 
This is discussed in Chapter 8 of my book. You can check out the
examples from my book at:

http://www.loyola.edu/education/PowerfulPowerPoint/

Click on Examples by Chapter and Chapter 8. Random numbers are dealt
within examples 8-13 through 8-17. Randomly selecting another slide is
done in examples 8-16 and 8-17.

--David

--
David M. Marcovitz, Ph.D.
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
[CRITICAL UPDATE - Anyone using Office 2003 should install the critical
update as soon as possible. From PowerPoint, choose "Help -> Check for
Updates".]
[TOP ISSUE - Are you having difficulty opening presentations in PPT 2003
that you just created in PPT 2003? -
http://support.microsoft.com/?id=329820]

Hello,

As you discovered, PowerPoint does not have the ability to allow you to
choose to display all (or subset of slides) in a random order or display a
random slide at a specific point in a presentation, without having to
resort to VBA or add-ins.

If you (or anyone else reading this message) feel strongly that PowerPoint
should have this kind of feature, don't forget to send your feedback (in
YOUR OWN WORDS, please) to Microsoft at:

http://register.microsoft.com/mswish/suggestion.asp

It's VERY important that, for EACH wish, you describe in detail, WHY it is
important TO YOU that your product suggestion be implemented. A good wish
submssion includes WHAT scenario, work-flow, or end-result is blocked by
not having a specific feature, HOW MUCH time and effort ($$$) is spent
working around a specific limitation of the current product, etc. Remember
that Microsoft receives THOUSANDS of product suggestions every day and we
read each one but, in any given product development cycle, there are ONLY
sufficient resources to address the ones that are MOST IMPORTANT to our
customers so take the extra time to state your case as CLEARLY and
COMPLETELY as possible so that we can FEEL YOUR PAIN.

IMPORTANT: Each submission should be a single suggestion (not a list of
suggestions).

John Langhans
Microsoft Corporation
Supportability Program Manager
Microsoft Office PowerPoint for Windows
Microsoft Office Picture Manager for Windows

For FAQ's, highlights and top issues, visit the Microsoft PowerPoint
support center at: http://support.microsoft.com/default.aspx?pr=ppt
Search the Microsoft Knowledge Base at:
http://support.microsoft.com/default.aspx?pr=kbhowto

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
 
Thats pretty much how I envisaged it David, what I'm
missing though is the bit that links it together so the
presentation can run without user clicking.

What I want to know is how can I link a macro to run when
the a slide becomes visible .. then I'd have the following

OnSlideVisible
Pick Random Slide in range 30-39
Insert as next slide

etc
 
Peter,
How do you want it to work? Is this presentation going to be run in a loop
with a new random slide during each loop or is it going to be run once?
You could quickly generate a custom show with random slides if you need to
generate it on the fly however if you want a random slide during each loop
it would require a different approach.

Regards
Shyam Pillai

http://www.mvps.org/skp
 
How do you get started in this automatic loop? If you click a button at
some point, you can have the VBA do whatever you want. There is some
ability in PowerPoint 2000 and beyond to do some event trapping (that
might be able to do something when a slide is opened), but I do
everything from a button. Do you want something like this:

Sub AutoRandomNext
Wait (15) 'Wait 15 seconds
RandomNext 'Go to a randomly selected next slide
Wait (15)
RandomNext
Wait (15)
ActivePresentation.SlideShowWindow.View.GotoSlide 40
End Sub

The Wait procedure is like what's in Example 8-4 on my site, and the
RandomNext is like the procedures in Examples 8-16 and 8-17. Altogether,
this waits 15 seconds, goes to a randomly selected slide, waits another
15 seconds, goes to another randomly selected slide, waits another 15
seconds, and then goes to slide 40. The only user intervention is to
initially click on the button that activates this. Of course, if you want
to go to more than a couple of random slides, you could use a loop.

If this won't work for you, please clarify what you want, and we can try
again.

--David

--
David M. Marcovitz, Ph.D.
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
Back
Top