Randomize the order of a PowerPoint presentation
Excel MVP Tushar Mehta has a free add-in that creates a custom show of the slides in random order and shows it
There's another VBA example on PowerPoint MVP David Marcovitz' site. Look for examples 8.16 and 8.17. Go to Examples by Chapter and click on Chapter 8.
Bill Dillworth mentions this alternate solution:
Create an action button and have it invoke this macro (that will take you to a random slide):
Private Sub CommandButton1_Click() ActivePresentation.SlideShowWindow _ .View.GotoSlide Int(Rnd * _ ActivePresentation.Slides.Count) + 1 End Sub
Or roll your own with VBA
This macro from PowerPoint MVP Brian Reilly will randomize the order of slides in a presentation:
Sub sort_rand() Dim i As Integer Dim myvalue As Integer Dim islides As Integer islides = ActivePresentation.Slides.Count For i = 1 To ActivePresentation.Slides.Count myvalue = Int((i * Rnd) + 1) ActiveWindow.ViewType = ppViewSlideSorter ActivePresentation.Slides(myvalue).Select ActiveWindow.Selection.Cut ActivePresentation.Slides(islides - 1).Select ActiveWindow.View.Paste Next End Sub
See How do I use VBA code in PowerPoint? to learn how to use this example code.