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.

Visual Basic for Applications
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: