ColorFormat.RGB property (PowerPoint)
Returns or sets the red-green-blue (RGB) value of the specified color. Read/write.
Syntax
expression. RGB
expression A variable that represents a ColorFormat object.
Return value
Long
Example
This example sets the background color for the first shape on the first slide of the active presentation to red and Accent 1 to green in the theme for the first slide master.
With ActivePresentation
Dim oCF As ColorFormat
Set oCF = .Slides(1).Shapes(1).Fill.ForeColor
oCF.RGB = RGB(255, 0, 0)
.Designs(1).SlideMaster.Theme.ThemeColorScheme(msoThemeAccent1).RGB = RGB(0, 255, 0)
End With
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.