How to Randomize Slides Order in PowerPoint

The easiest way to randomize slides order in PowerPoint is simply by dragging each one of them to a different position. It might work well on a smaller number of slides, but if you want to randomize tons of slides, then that’s not the quickest solution.

Thankfully, PowerPoint can integrate with Microsoft VBA to run a specific script that will instantly randomize slides for you. It doesn’t care if you have a dozen or hundreds of slides, the script would run as it was designed to.

In this guide, I will show you how to randomize PowerPoint slides with the help of Microsoft VBA. I also want to acknowledge PPTVBA for providing the code. It’s an interesting website if you are looking for some PowerPoint wizardry.

Anyway, let’s get into it.

1. First, open the PowerPoint document you want to randomize. In this example, I have 9 numbered slides.

2. Then, press Alt+F11 simultaneously to launch the Microsoft VBA window.

3. Go to Insert > Module.

4. Insert this code into the code editor. Don’t forget to declare the FirstSlide and LastSlide values in the code based on the PowerPoint file.

Sub ShuffleSlides()
FirstSlide = 1
LastSlide = 9
'just change your slide numbers above'
Randomize

For i = FirstSlide To LastSlide
RSN = Int((LastSlide - FirstSlide + 1) * Rnd + FirstSlide)
ActivePresentation.Slides(i).MoveTo (RSN)
Next i
End Sub 

5. Now, go back to the PowerPoint window.

6. Click View > Macros.

7. Select ShuffleSlides, and hit Run.

8. The slides will be randomized. You may run the code again to get a different result.

9. When you save the document, it may warn you that the VBA code can’t be saved together. That’s okay, just click Yes to continue.

And that’s it, the easiest and perhaps the only way to quickly randomize slides in Microsoft PowerPoint.