ThemeColorScheme.Colors method (Office)

Gets an object that represents a color in the color scheme of a Microsoft Office theme.



expression An expression that returns a ThemeColorScheme object.


Name Required/Optional Data type Description
Index Required MsoThemeColorSchemeIndex The index value of the ThemeColor object.

Return value



In the following example, the msoThemeAccent1 theme color is set to the color Red, and then the scheme is saved to a file.

Dim tTheme As OfficeTheme 
Dim tcsThemeColorScheme As ThemeColorScheme 
Dim tcThemeColor As ThemeColor 
tcThemeColor.RGB = RGB(255, 0, 0) 
Set tcColorScheme.Colors(msoThemeAccent1) = tcThemeColor 
tcsThemeColorScheme.Save ("C:\myThemeColorScheme.xml") 

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.