Skip to content

Latest commit

 

History

History
55 lines (33 loc) · 1.72 KB

Word.Document.ApplyTheme.md

File metadata and controls

55 lines (33 loc) · 1.72 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Document.ApplyTheme method (Word)
vbawd10.chm158007618
vbawd10.chm158007618
Word.Document.ApplyTheme
a4b9180e-5128-6a19-a629-47c20837f84b
06/08/2017
medium

Document.ApplyTheme method (Word)

Applies a theme to an open document.

Syntax

expression. ApplyTheme( _Name_ )

expression Required. A variable that represents a Document object.

Parameters

Name Required/Optional Data type Description
Name Required String The name of the theme plus any theme formatting options you want to apply. The format of this string is "themennn" where theme and nnn are defined as follows:
String Description
theme The name of the folder that contains the data for the requested theme. (The default location for theme data folders is C:\Program Files\Common Files\Microsoft Shared\Themes.) You must use the folder name for the theme rather than the display name that appears in the Theme dialog box.
nnn A three-digit string that indicates which theme formatting options to activate (1 to activate, 0 to deactivate). The digits correspond to the Vivid Colors, Active Graphics, and Background Image check boxes in the Theme dialog box. If this string is omitted, the default value for nnn is "011" (Active Graphics and Background Image are activated).

|

Example

This example applies the Artsy theme to the active document and activates the Vivid Colors option.

ActiveDocument.ApplyTheme "artsy 100"

See also

Document Object

[!includeSupport and feedback]