Converting Scheme/Theme colors to non-Scheme colors
Problem
If you've filled a shape with one of PowerPoint's scheme (PPT 97-2003) or theme (PPT 2007 and on) colors, the shape's color will change if you copy it into a presentation with a different theme/scheme or apply a different theme/scheme to the current presentation.
Sometimes this is exactly what you want to have happen.
Sometimes not. If you work for a certain famous beverage company headquartered in Atlanta, Georga, USA, you do NOT want your red-colored logos turning blue when you move slides between presentations.
The macros below will convert fills from scheme/themed to plain RGB. When you use RGB fills, the color stays put. It won't change when themes/schemes change. There's a macro to convert all of the fills in the presentation and another to convert just the currently selected fill.
We'll leave it as an exercise for the reader to expand this to handle line colors. And gradients. And all that other fun stuff.
Solution
Run this macro on the presentation to convert the fill of any scheme/theme colored shapes to plain RGB fills.
Sub AllSchemesToRGB() ' changes scheme fills to rgb fills Dim oSh As Shape Dim oSl As Slide Dim lColor As Long For Each oSl In ActivePresentation.Slides For Each oSh In oSl.Shapes With oSh If .Fill.ForeColor.Type = msoColorTypeScheme Then lColor = .Fill.ForeColor.RGB .Fill.ForeColor.RGB = lColor End If End With Next ' shape Next ' slide End Sub
Or to select and change just one shape at a time, use this:
Sub SchemeToRGB() ' changes scheme fills to rgb fills Dim oSh As Shape Dim lColor As Long Set oSh = ActiveWindow.Selection.ShapeRange(1) With oSh If .Fill.ForeColor.Type = msoColorTypeScheme Then lColor = .Fill.ForeColor.RGB .Fill.ForeColor.RGB = lColor End If End With End Sub
See How do I use VBA code in PowerPoint? to learn how to use this example code.