_Document.ApplyTheme(String) 方法

定义

将主题应用于打开的文档。Applies a theme to an open document.

public:
 void ApplyTheme(System::String ^ Name);
public void ApplyTheme (string Name);
abstract member ApplyTheme : string -> unit
Public Sub ApplyTheme (Name As String)

参数

Name
String

必需的 字符串Required String. 主题名称及要应用的任何主题格式选项。The name of the theme plus any theme formatting options you want to apply. 此字符串的格式为 " theme nnn ",并按如下所 theme nnn 示定义: StringDescription theme 包含请求的主题的数据的文件夹的名称。The format of this string is "theme nnn" where theme and nnn are defined as follows:StringDescriptionthemeThe name of the folder that contains the data for the requested theme. (主题数据文件夹的默认位置是 C:\Program Files\Common Files\Microsoft Shared\Themes.)必须使用主题的文件夹名称,而不是显示在主题对话框(主题命令,"格式" 菜单)中的显示名称。 nnn一个由三个数字组成的字符串,用于指示要激活的主题格式选项(1为激活,0为停用)。(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 (Theme command, Format menu).nnnA 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 (Theme command, Format menu). 如果省略此字符串,则的默认值 nnn 为 "011" (活动图形和背景图像将被激活)。If this string is omitted, the default value for nnn is "011" (Active Graphics and Background Image are activated).

适用于