ThemeColorScheme.Colors method (Office)
Gets an object that represents a color in the color scheme of a Microsoft Office theme.
Syntax
expression.Colors(Index)
expression An expression that returns a ThemeColorScheme object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Index | Required | MsoThemeColorSchemeIndex | The index value of the ThemeColor object. |
Return value
ThemeColor
Example
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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for