just_bri
07-27-2017, 08:43 PM
Hello. :)
I have MS Office 2016. I made some PowerPoint flashcards for class, and I assigned a different background color for each chapter. I want the slides shuffled, so I used a "slideshow randomizer" macro I found online...but it removes ALL of the background colors.
I discovered that if you manually cut a slide -- and then use Paste Special: Keep Source Formatting -- the slide remained unchanged. Is there a way to add this command to a macro?
Here's the shuffle/randomizer code I've been using. I'm assuming the last line needs to be changed somehow.
Thanks in advance for any help! :):
Sub sort_rand()
'CODE TAKEN FROM: pptfaq. com/FAQ00429_Randomize_the_order_of_a_PowerPoint_presentation.htm
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
I have MS Office 2016. I made some PowerPoint flashcards for class, and I assigned a different background color for each chapter. I want the slides shuffled, so I used a "slideshow randomizer" macro I found online...but it removes ALL of the background colors.
I discovered that if you manually cut a slide -- and then use Paste Special: Keep Source Formatting -- the slide remained unchanged. Is there a way to add this command to a macro?
Here's the shuffle/randomizer code I've been using. I'm assuming the last line needs to be changed somehow.
Thanks in advance for any help! :):
Sub sort_rand()
'CODE TAKEN FROM: pptfaq. com/FAQ00429_Randomize_the_order_of_a_PowerPoint_presentation.htm
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