Macro to sort Power Point Slides Radomly
| Author |
Message |
|
Derec #1 / 13
|
 Macro to sort Power Point Slides Radomly
I was wondering if someone could assist me in creating a macro to sort the slides of a powerpoint slide show radomly on demand. Please Help. Im desperate. Also if there is any other way to do this, Im open to ideas. Thanks for everyones help. Please email me. Thanks Dereck
|
| Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
|
PK Huntzinge #2 / 13
|
 Macro to sort Power Point Slides Radomly
Dereck, Can't do the email bit. We try to keep the messages on the newsgroups so that (1) more people can benefit from the answers and (2) the questioner can benefit from more answers. As to the macro, I had one of these a while back. I'll try to find it but I'm pretty sure it's at home not work, so I'll not even be able to look till late tonight. If I remember correctly, it took all the slideIDs and put them into an array, randomized them, then made a custom show with the new order. Kathy Quote:
> I was wondering if someone could assist me in creating a macro to sort the > slides of a powerpoint slide show radomly on demand. Please Help. > Im desperate. Also if there is any other way to do this, Im open to ideas. > Thanks for everyones help. > Please email me. > Thanks > Dereck
|
| Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
|
Brian Reilly, M #3 / 13
|
 Macro to sort Power Point Slides Radomly
Dear Dereck, Don't despair. Don't do desperate. Dis does dat. Sub Don_t_Do_Desperate() Dim d As Integer Dim dvalue As Integer Dim dslides As Integer dslides = ActivePresentation.Slides.Count For d = 1 To ActivePresentation.Slides.Count dvalue = Int((d * Rnd) + 1) ActiveWindow.ViewType = ppViewSlideSorter ActivePresentation.Slides(dvalue).Select ActiveWindow.Selection.Cut ActivePresentation.Slides(dslides - 1).Select ActiveWindow.View.Paste Next msgbox "Done Dude. Deal." End Sub why Do dey ask? Dunno! Brian D. Reilly, PowerPoint MVP (really is D. too)
Quote: >I was wondering if someone could assist me in creating a macro to sort the >slides of a powerpoint slide show radomly on demand. Please Help. >Im desperate. Also if there is any other way to do this, Im open to ideas. >Thanks for everyones help. >Please email me. >Thanks >Dereck
|
| Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
|
Meliss #4 / 13
|
 Macro to sort Power Point Slides Radomly
Shouldn't you be calling your doctor? LOL Melissa
Quote: > Dear Dereck, > Don't despair. > Don't do desperate. > Dis does dat. > Sub Don_t_Do_Desperate() > Dim d As Integer > Dim dvalue As Integer > Dim dslides As Integer > dslides = ActivePresentation.Slides.Count > For d = 1 To ActivePresentation.Slides.Count > dvalue = Int((d * Rnd) + 1) > ActiveWindow.ViewType = ppViewSlideSorter > ActivePresentation.Slides(dvalue).Select > ActiveWindow.Selection.Cut > ActivePresentation.Slides(dslides - 1).Select > ActiveWindow.View.Paste > Next > msgbox "Done Dude. Deal." > End Sub > why Do dey ask? > Dunno! > Brian D. Reilly, PowerPoint MVP (really is D. too)
> >I was wondering if someone could assist me in creating a macro to sort the > >slides of a powerpoint slide show radomly on demand. Please Help. > >Im desperate. Also if there is any other way to do this, Im open to ideas. > >Thanks for everyones help. > >Please email me. > >Thanks > >Dereck
|
| Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
|
Peter Hesket #5 / 13
|
 Macro to sort Power Point Slides Radomly
Correct me if I'm wrong, but doesn't your suggestion allow some slides to be missed and others repeated? If you need to shuffle items, take each element of the array in order, and swap it with a randomly chosen element. Peter Hesketh "Do dey do dat today, den?" "Dey don't do dat today, dough, do dey?" "No, dey don't".
Quote: >Dear Dereck, >Don't despair. >Don't do desperate. >Dis does dat. >Sub Don_t_Do_Desperate() > Dim d As Integer > Dim dvalue As Integer > Dim dslides As Integer > dslides = ActivePresentation.Slides.Count > For d = 1 To ActivePresentation.Slides.Count > dvalue = Int((d * Rnd) + 1) > ActiveWindow.ViewType = ppViewSlideSorter > ActivePresentation.Slides(dvalue).Select > ActiveWindow.Selection.Cut > ActivePresentation.Slides(dslides - 1).Select > ActiveWindow.View.Paste > Next >msgbox "Done Dude. Deal." >End Sub >why Do dey ask? >Dunno! >Brian D. Reilly, PowerPoint MVP (really is D. too)
>>I was wondering if someone could assist me in creating a macro to sort the >>slides of a powerpoint slide show radomly on demand. Please Help. >>Im desperate. Also if there is any other way to do this, Im open to ideas. >>Thanks for everyones help. >>Please email me. >>Thanks >>Dereck
|
| Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
|
Brian Reilly, M #6 / 13
|
 Macro to sort Power Point Slides Radomly
Peter, Probably does, but so would manual shuffling of a deck of cards. Brian Reilly, PowerPoint MVP
Quote: >Correct me if I'm wrong, but doesn't your suggestion allow some slides to be >missed and others repeated? >If you need to shuffle items, take each element of the array in order, and >swap it with a randomly chosen element. >Peter Hesketh >"Do dey do dat today, den?" >"Dey don't do dat today, dough, do dey?" >"No, dey don't".
>>Dear Dereck, >>Don't despair. >>Don't do desperate. >>Dis does dat. >>Sub Don_t_Do_Desperate() >> Dim d As Integer >> Dim dvalue As Integer >> Dim dslides As Integer >> dslides = ActivePresentation.Slides.Count >> For d = 1 To ActivePresentation.Slides.Count >> dvalue = Int((d * Rnd) + 1) >> ActiveWindow.ViewType = ppViewSlideSorter >> ActivePresentation.Slides(dvalue).Select >> ActiveWindow.Selection.Cut >> ActivePresentation.Slides(dslides - 1).Select >> ActiveWindow.View.Paste >> Next >>msgbox "Done Dude. Deal." >>End Sub >>why Do dey ask? >>Dunno! >>Brian D. Reilly, PowerPoint MVP (really is D. too)
>>>I was wondering if someone could assist me in creating a macro to sort the >>>slides of a powerpoint slide show radomly on demand. Please Help. >>>Im desperate. Also if there is any other way to do this, Im open to >ideas. >>>Thanks for everyones help. >>>Please email me. >>>Thanks >>>Dereck
|
| Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
|
Peter Hesket #7 / 13
|
 Macro to sort Power Point Slides Radomly
Erm - if I could manually shuffle a deck of cards and end up with two "Ace of Spades" and no "Two of Diamonds" I'd either be very rich or dead with a bullet hole in my chest. Are you sure you mean "so would manual shuffling of a deck of cards"?
Quote: >Peter, >Probably does, but so would manual shuffling of a deck of cards. >Brian Reilly, PowerPoint MVP
>>Correct me if I'm wrong, but doesn't your suggestion allow some slides to be >>missed and others repeated? >>If you need to shuffle items, take each element of the array in order, and >>swap it with a randomly chosen element. >>Peter Hesketh >>"Do dey do dat today, den?" >>"Dey don't do dat today, dough, do dey?" >>"No, dey don't".
>>>Dear Dereck, >>>Don't despair. >>>Don't do desperate. >>>Dis does dat. >>>Sub Don_t_Do_Desperate() >>> Dim d As Integer >>> Dim dvalue As Integer >>> Dim dslides As Integer >>> dslides = ActivePresentation.Slides.Count >>> For d = 1 To ActivePresentation.Slides.Count >>> dvalue = Int((d * Rnd) + 1) >>> ActiveWindow.ViewType = ppViewSlideSorter >>> ActivePresentation.Slides(dvalue).Select >>> ActiveWindow.Selection.Cut >>> ActivePresentation.Slides(dslides - 1).Select >>> ActiveWindow.View.Paste >>> Next >>>msgbox "Done Dude. Deal." >>>End Sub >>>why Do dey ask? >>>Dunno! >>>Brian D. Reilly, PowerPoint MVP (really is D. too)
>>>>I was wondering if someone could assist me in creating a macro to sort the >>>>slides of a powerpoint slide show radomly on demand. Please Help. >>>>Im desperate. Also if there is any other way to do this, Im open to >>ideas. >>>>Thanks for everyones help. >>>>Please email me. >>>>Thanks >>>>Dereck
|
| Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
|
echo #8 / 13
|
 Macro to sort Power Point Slides Radomly
Well, Peter, you *do* know that Brian's not playing with a full deck anyway, right? <VBG> Echo Quote:
> Erm - if I could manually shuffle a deck of cards and end up with two "Ace > of Spades" and no "Two of Diamonds" I'd either be very rich or dead with a > bullet hole in my chest. Are you sure you mean "so would manual shuffling > of a deck of cards"?
> >Peter, > >Probably does, but so would manual shuffling of a deck of cards. > >Brian Reilly, PowerPoint MVP
> >>Correct me if I'm wrong, but doesn't your suggestion allow some slides to > be > >>missed and others repeated? > >>If you need to shuffle items, take each element of the array in order, and > >>swap it with a randomly chosen element. > >>Peter Hesketh > >>"Do dey do dat today, den?" > >>"Dey don't do dat today, dough, do dey?" > >>"No, dey don't".
> >>>Dear Dereck, > >>>Don't despair. > >>>Don't do desperate. > >>>Dis does dat. > >>>Sub Don_t_Do_Desperate() > >>> Dim d As Integer > >>> Dim dvalue As Integer > >>> Dim dslides As Integer > >>> dslides = ActivePresentation.Slides.Count > >>> For d = 1 To ActivePresentation.Slides.Count > >>> dvalue = Int((d * Rnd) + 1) > >>> ActiveWindow.ViewType = ppViewSlideSorter > >>> ActivePresentation.Slides(dvalue).Select > >>> ActiveWindow.Selection.Cut > >>> ActivePresentation.Slides(dslides - 1).Select > >>> ActiveWindow.View.Paste > >>> Next > >>>msgbox "Done Dude. Deal." > >>>End Sub > >>>why Do dey ask? > >>>Dunno! > >>>Brian D. Reilly, PowerPoint MVP (really is D. too)
> >>>>I was wondering if someone could assist me in creating a macro to sort > the > >>>>slides of a powerpoint slide show radomly on demand. Please Help. > >>>>Im desperate. Also if there is any other way to do this, Im open to > >>ideas. > >>>>Thanks for everyones help. > >>>>Please email me. > >>>>Thanks > >>>>Dereck
|
| Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
|
Brian Reilly, M #9 / 13
|
 Macro to sort Power Point Slides Radomly
Peter, I think Echo states it best (g). I meant that manually shuffling a deck would not necessarily move every card in the process of changing it's index in the deck. Never mentioned duplicating cards. Brian Reilly, PowerPoint MVP
Quote: >Erm - if I could manually shuffle a deck of cards and end up with two "Ace >of Spades" and no "Two of Diamonds" I'd either be very rich or dead with a >bullet hole in my chest. Are you sure you mean "so would manual shuffling >of a deck of cards"?
>>Peter, >>Probably does, but so would manual shuffling of a deck of cards. >>Brian Reilly, PowerPoint MVP
>>>Correct me if I'm wrong, but doesn't your suggestion allow some slides to >be >>>missed and others repeated? >>>If you need to shuffle items, take each element of the array in order, and >>>swap it with a randomly chosen element. >>>Peter Hesketh >>>"Do dey do dat today, den?" >>>"Dey don't do dat today, dough, do dey?" >>>"No, dey don't".
>>>>Dear Dereck, >>>>Don't despair. >>>>Don't do desperate. >>>>Dis does dat. >>>>Sub Don_t_Do_Desperate() >>>> Dim d As Integer >>>> Dim dvalue As Integer >>>> Dim dslides As Integer >>>> dslides = ActivePresentation.Slides.Count >>>> For d = 1 To ActivePresentation.Slides.Count >>>> dvalue = Int((d * Rnd) + 1) >>>> ActiveWindow.ViewType = ppViewSlideSorter >>>> ActivePresentation.Slides(dvalue).Select >>>> ActiveWindow.Selection.Cut >>>> ActivePresentation.Slides(dslides - 1).Select >>>> ActiveWindow.View.Paste >>>> Next >>>>msgbox "Done Dude. Deal." >>>>End Sub >>>>why Do dey ask? >>>>Dunno! >>>>Brian D. Reilly, PowerPoint MVP (really is D. too)
>>>>>I was wondering if someone could assist me in creating a macro to sort >the >>>>>slides of a powerpoint slide show radomly on demand. Please Help. >>>>>Im desperate. Also if there is any other way to do this, Im open to >>>ideas. >>>>>Thanks for everyones help. >>>>>Please email me. >>>>>Thanks >>>>>Dereck
|
| Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
|
Stevebar #10 / 13
|
 Macro to sort Power Point Slides Radomly
Quote: >msgbox "Done Dude. Deal." >End Sub >why Do dey ask? >Dunno! >Brian D. Reilly, PowerPoint MVP
Brian, I too, would like to use this. But I am unfamiliar with using macros or VB. Is this something you can go into a bit more and tell me how to use it? Thanks. steve Steve Barker
|
| Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
|
Brian Reilly, M #11 / 13
|
 Macro to sort Power Point Slides Radomly
Steve, That's sort of a rather broad question (g). If you want to know the basics about how to run it here's the simplest of explanations. Macro code (ie, VBA code) is stored inside of the presentation in what is generally called a module. From slide edit mode, click Alt+F11 and then from the menu of the VBE (Visual Basic Editor), choose Insert Module. Paste the previous code there and press Alt Q to go back to PPT. From the PPT menu select Tools, Macros, Run Macros and select that macro and press run. As I said that is the most basic, and not perfectly lucid explanation of it's workings. I'm not sure what you are trying to learn or what you think Macros can or cannot do. But, that is one of the reasons we are here, to explore areas like that. Ask away. Brian Reilly, PowerPoint MVP
Quote: >>msgbox "Done Dude. Deal." >>End Sub >>why Do dey ask? >>Dunno! >>Brian D. Reilly, PowerPoint MVP >Brian, I too, would like to use this. But I am unfamiliar with using macros or >VB. Is this something you can go into a bit more and tell me how to use it? >Thanks. >steve >Steve Barker
|
| Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
|
Stevebar #12 / 13
|
 Macro to sort Power Point Slides Radomly
Quote: >I'm not sure what you are trying to learn or what you think Macros can >or cannot do. But, that is one of the reasons we are here, to explore >areas like that. Ask away. >Brian Reilly, PowerPoint MVP
At this point I need only to sort 138 slides randomly like the other user that asked. HOWEVER, in the future, I may have other needs for macros and VB in PP. I just never know where my mind will run. <G>. Thanks for the reply, I have printed it out and will attempt later. steve Steve Barker
|
| Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
|
Stevebar #13 / 13
|
 Macro to sort Power Point Slides Radomly
Quote: >Steve, >That's sort of a rather broad question (g). >If you want to know the basics about how to run it here's the simplest >of explanations. >Macro code (ie, VBA code) is stored inside of the presentation in what >is generally called a module. From slide edit mode, click Alt+F11 and >then from the menu of the VBE (Visual Basic Editor), choose Insert >Module. Paste the previous code there and press Alt Q to go back to >PPT. >From the PPT menu select Tools, Macros, Run Macros and select that >macro and press run. >As I said that is the most basic, and not perfectly lucid explanation >of it's workings. >I'm not sure what you are trying to learn or what you think Macros can >or cannot do. But, that is one of the reasons we are here, to explore >areas like that. Ask away. >Brian Reilly, PowerPoint MVP
Brian, many thanks. I'm not sure I understand what exactly takes place there, but I ran the macro about 5 times and the slides were quite nicely shaken up. <G>. steve Steve Barker
|
| Wed, 18 Jun 1902 08:00:00 GMT |
|
| |
|