Super User Asked by NotepadPlusPlus PRO on November 7, 2021
Is there a macro that can change the PowerPoint slides to have random background colors? I have looked for the PowerPoint themes, but usually they have few colors scheme.
I am looking for a way to automatically apply random background colors to existing PowerPoint slides?
You can try the code below. It loops through the slides and changes their background colors. The colors are selected randomly for each slide.
Note: When testing, I noticed that I had to change the slides' background color from white to another color for a slide to start changing its color. I advise you do the same.
Sub SetRandomBackground()
Dim x, red, blue, green As Integer
Dim myslide As Slide
For Each myslide In ActivePresentation.Slides
red = Int((255 * Rnd) + 1)
blue = Int((255 * Rnd) + 1)
green = Int((255 * Rnd) + 1)
myslide.Background.Fill.ForeColor.RGB = RGB(red, green, blue)
Next
End Sub
Answered by Reddy Lutonadio on November 7, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP