Document apiReferenceStyles

styles.getTheme

Read the document theme: its 12 theme colors, major and minor fonts, and the color mapping from settings.xml. A missing or malformed theme part returns the default Office theme labeled source 'fallback', with part status and diagnostics. Same theme as doc.get().theme, without the rest of the document.

read-onlyidempotent
doc.styles.getTheme(…)

Expected result

Returns a StylesGetThemeResult with the theme (always present, labeled document or fallback), the theme and settings part status, and diagnostics.

Inputs

This operation takes no input fields.

Result

Output fields
themeobjectrequired
Fields
source"document" | "fallback"required
colorSchemeobjectrequired
fontSchemeobject
colorSchemeMappingobject
sourceStatusobjectrequired
Fields
theme"present" | "missing" | "malformed"required
settings"present" | "missing" | "malformed"required
diagnosticsobject[]required

Failures

Pre-apply throws

  • INVALID_INPUT
  • CAPABILITY_UNAVAILABLE

Raw schemas

Open the generated JSON artifact for the exact input, output, success, and failure schemas represented by this contract version.

View raw JSON schemas