Glam Prestige Journal

Bright entertainment trends with youth appeal.

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?

Here is an example:

enter image description here

Nice to Have:

  • It would be nice to have a control over sequence of colors to pick from.

Note:

  • I can manually change individual background colors. But that is not the intent of this question.

1 Answer

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

IMG:

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy