How to reproduce old-style preset gradients
Problem
There used to be a variety of available pre-set gradients in PPT but they're no longer available in more recent versions.
Solution
Here's a bit of code that will create samples of each preset gradient and show you the transparency, stops, and RGB colors needed to re-create them. You could also use the resulting file as a source to pick up with the formatting paintbrush and apply to other shapes.
Or just download the finished sample presentation (PresetGradientSpecs) if you prefer.
Sub ShowMeTheGrads()
' Start with a 24-slide presentation
' 1 shape on each slide (ie a full-slide rectangle)
Dim lPSGradType As Long
Dim lGradStop As Long
Dim lShape As Long
Dim sTemp As String
Dim lRed As Long
Dim lGreen As Long
Dim lBlue As Long
For lPSGradType = 1 To 24 ' there are 24 preset gradient types
sTemp = ""
With ActivePresentation.Slides(lPSGradType).Shapes(1)
.Fill.PresetGradient msoGradientHorizontal, 2, lPSGradType
sTemp = "Gradient Type " & lPSGradType & vbCr
With .Fill.GradientStops
sTemp = sTemp & "Gradient stops:" & vbTab & CStr(.Count) & vbCr
For lGradStop = 1 To .Count
sTemp = sTemp & "Stop #:" & vbTab & CStr(lGradStop) & vbCr
sTemp = sTemp & "Position: " & vbTab & CStr(.Item(lGradStop).Position) & vbCr
sTemp = sTemp & "Transparency: " & vbTab & CStr(.Item(lGradStop).Transparency) & vbCr
Call LongColorToRGB(lRed, lGreen, lBlue, .Item(lGradStop).Color.RGB)
sTemp = sTemp & "Color RGB: " & vbTab & "R: " & lRed & " / G: " & lGreen & " / B: " & lBlue & vbCr
Next
End With
With .TextFrame.TextRange
.Font.Size = 14
.Text = sTemp
.ParagraphFormat.Alignment = ppAlignLeft
End With
End With ' Slide(lPSGradType)
Next
End Sub
' Here are the names of the gradient fills, in no particular order
'msoGradientBrass
'msoGradientCalmWater
'msoGradientChrome
'msoGradientChromeII
'msoGradientDaybreak
'msoGradientDesert
'msoGradientEarlySunset
'msoGradientFire
'msoGradientFog
'msoGradientGold
'msoGradientGoldII
'msoGradientHorizon
'msoGradientLateSunset
'msoGradientMahogany
'msoGradientMoss
'msoGradientNightfall
'msoGradientOcean
'msoGradientParchment
'msoGradientPeacock
'msoGradientRainbow
'msoGradientRainbowII
'msoGradientSapphire
'msoGradientSilver
'msoGradientWheat
Sub LongColorToRGB(ByRef pRed As Variant, _
ByRef pGreen As Variant, _
ByRef pBlue As Variant, _
ByVal pRGBColor As Long)
' Returns the R, G, B components of an RGB Long value
' Note: if long > 16777214, returns 255s for all three values
pRed = pRGBColor Mod 256
pGreen = pRGBColor \ 256 Mod 256
pBlue = pRGBColor \ 65536 Mod 256
End Sub
See How do I use VBA code in PowerPoint? to learn how to use this example code.