Table of contents
TOC
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.

Syntax

expression. GetCustomColor( Name )

expression An expression that returns a ThemeColorScheme object.

Parameters

NameRequired/OptionalData TypeDescription
NameRequiredStringThe 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.

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

See also

Concepts

ThemeColorScheme Object

Other resources

ThemeColorScheme Object Members

© 2018 Microsoft