Table of contents
Collapse the table of content
Expand the table of content

ThemeColorScheme.GetCustomColor Method (Office)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

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


expression. GetCustomColor( Name )

expression An expression that returns a ThemeColorScheme object.


NameRequired/OptionalData TypeDescription
NameRequiredStringThe name of the custom color.

Return Value



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


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.

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

See also


ThemeColorScheme Object

Other resources

ThemeColorScheme Object Members

© 2018 Microsoft