Syntax

expression.GetCustomColor(Name)

expression An expression that returns a ThemeColorScheme object.

Parameters

Name Required/Optional Data Type Description
Name Required String The name of the custom color.

Return Value
MsoRGBType

Remarks
If the named custom color doesn't exist, an error is generated.

Example

The following example creates a variable representing the color scheme in an Office theme and then creates another variable containing a custom color. This custom color can then be combined with other colors to define the theme.

Visual Basic for Applications
Dim tTheme As OfficeTheme Dim tcsThemeColorScheme As ThemeColorScheme Dim csCustomColor As MsoRGBType Set tcsThemeColorScheme = tTheme.ThemeColorScheme csCustomColor = tcsThemeColorScheme.GetCustomColor("CheerfulColor") 

See also: