How to Randomize Slides in Powerpoint 2007

By Dustin Thornton

Microsoft PowerPoint 2007 allows you to create a dynamic slideshow presentation quickly and easily. Occasionally you may have a PowerPoint presentation with slides that you want to put in random order or randomize. Unfortunately PowerPoint does not have an option to accomplish this. You can, however, create a macro using Microsoft's built-in VBA editor to randomize all slides in a particular PowerPoint presentation. You can then run this macro as many times as you wish to randomize the order of the slides in the presentation.

Step 1

Launch PowerPoint 2007 by double-clicking on the desktop icon or clicking Start > All Programs > Microsoft Office > Microsoft Office PowerPoint 2007.

Step 2

Click the "Office" button in the upper left and select "Open." Navigate to the location of the PowerPoint presentation you want to randomize the slides in and double-click it to open it in PowerPoint.

Step 3

Press the "Alt" and "F11" key simultaneously to launch the Microsoft VBA editor. A new window will appear.

Step 4

Click on the filename of your presentation in the left "Project" pane to select it. Click on "Insert" in the file menu and select "Module." An empty text field will appear.

Step 5

Input the following code into the field: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 NextEnd Sub

Step 6

Click on the "X" in the upper right corner of the VBA editor to exit it.

Step 7

Press the "Alt" and "F8" key simultaneously to open the "Macros" menu.

Step 8

Click on "sort_rand" in the "Macro name" section then click "Run." The macro will run and randomize all slides in your PowerPoint presentation.

Tips & Warnings

  • Each time you click "Run" in the Macros menu, PowerPoint will randomize the order of the slides again.