Create a macro to create a custom show in Powerpoint

I want to make a macro for PowerPoint to create a custom show containing all the slides from my PowerPoint, but in random order. How can I do it? I want to be able to run it and create different custom shows every time.

It has been three years since I used PowerPoint, and the only experience I had with VB was a bit of VB6 in 2004.

+3
source share
1 answer

Check out the information here .

Example:

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
+3
source

Source: https://habr.com/ru/post/1718674/


All Articles