Class
WordTheme
OfficeIMO.Word
The document theme: its colour scheme and its major (headings) and minor (body) fonts. Text, borders and shading that select a theme colour or theme font follow changes made here.
Inheritance
- object
- WordTheme
Remarks
Changing the theme also refreshes the literal colour and font values Word stores next to each theme selection, so applications that ignore the theme show the same result.
Usage
Explore 2 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 2
- Property WordDocument.Theme
- Method WordTheme.SetColor
Methods
public OfficeColor? GetColor(WordThemeColor color) #Gets a colour of the colour scheme, or null when the document has no theme.
Parameters
- color OfficeIMO.Word.WordThemeColor
- The scheme slot. Text and background aliases read the dark and light slots.
Returns
OfficeColor?public void Import(WordDocument source) #Replaces this document's theme with a copy of another document's theme.
Parameters
- source OfficeIMO.Word.WordDocument
- The document or template whose theme to copy. It is not changed; a read-only load is enough.
Exceptions
InvalidOperationException– The source document has no theme.
public WordTheme SetColor(WordThemeColor color, OfficeColor value) #Sets a colour of the colour scheme.
Parameters
- color OfficeIMO.Word.WordThemeColor
- The scheme slot. Text and background aliases set the dark and light slots.
- value OfficeIMO.OfficeColor
- The new colour.