Advertisement
KRITSADA

How to Make the Next Slide Random in PowerPoint

Mar 27th, 2018
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. How to Make the Next Slide Random in PowerPoint
  2. By Kenrick Callwood
  3. Microsoft PowerPoint makes it simple to build everything from professional presentations to multimedia kiosk exhibits. However, even with all of the built-in features, PowerPoint does not have a random slide command. You must use Visual Basic to make the next slide random in PowerPoint. The simplest method is to create an action button that will run a macro that calls for a random slide. Likely applications for this type of macro include games and picture slideshows.
  4.  
  5. Do the Initial Setup
  6. Step
  7. Launch Microsoft PowerPoint from the "Start" menu.
  8.  
  9. Step
  10. Open the slideshow you want to use with the random slide macro.
  11.  
  12. Step
  13. Click on the Office symbol to open the menu.
  14.  
  15. Step
  16. Click "PowerPoint Options" and navigate to the "Trust Center."
  17.  
  18. Step
  19. Click the "Trust Center Settings" button, and click the radio button to "Disable all macros with notification." Click "OK" to return to the PowerPoint Options window.
  20.  
  21. Step
  22. Click "Popular" and verify that "Show Developer Tab in the Ribbon" is enabled. Click "OK" to return to the presentation.
  23.  
  24. Create the Visual Basic Macro
  25. Step
  26. Press "Alt" + "F11" to open the Visual Basic Editor.
  27.  
  28. Step
  29. Click "Insert" and choose "Module."
  30.  
  31. Step
  32. Copy and paste the code below into the editor window.
  33.  
  34. Sub sortrand()
  35.     ActivePresentation.SlideShowWindow.View.GotoSlide Int(Rnd * ActivePresentation.Slides.Count) + 1
  36. End Sub
  37.  
  38. Step
  39. Press "Alt" + "Q" to save the macro and return to the presentation.
  40.  
  41. Create the Action Button
  42. Step
  43. Click the "Insert" tab and then the "Shapes" button.
  44.  
  45. Step
  46. Click on the desired shape under the "Action Buttons" heading at the bottom of the drop-down menu.
  47.  
  48. Step
  49. Click on the work area, and drag the shape to the desired size.
  50.  
  51. Step
  52. Click the radio button beside "Run macro" in the dialog box that appears, and select the "sort_rand" macro you created earlier. Click "OK."
  53.  
  54. Step
  55. Press "Ctrl" + "C" with the button selected to copy it to the clipboard.
  56.  
  57. Step
  58. Click on the next slide in the left pane.
  59.  
  60. Step
  61. Press "Ctrl" + "V" to paste the button into the slide. Repeat this for each slide in the presentation.
  62.  
  63. Step
  64. Press "F5" to begin the slideshow from the first slide.
  65.  
  66. Step
  67. Click on the button you created to make the next slide a random slide. Every time you click on the button, the PowerPoint macro will select a random slide to display.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement