WPS 基础接口 > 文字 API 参考 > Application > 属性 > Application.CustomizationContext 属性
返回或设置一个 TemplateDocument 对象,该对象代表存储菜单栏、工具栏和键绑定的更改的模板或文档。可读/写。

语法

表达式.CustomizationContext

表达式   一个代表 Application 对象的变量。

说明

对应于“工具”菜单“自定义”对话框“命令”选项卡上“保存于”框中的值。

示例

本示例将 Alt+Ctrl+W 添至 FileClose 命令,然后将该键盘自定义方案保存于“Normal”模板中。

示例代码
CustomizationContext = NormalTemplate
KeyBindings.Add(wdKeyCategoryCommand,"FileClose",BuildKeyCode(wdKeyControl,wdKeyAlt, wdKeyW))

本示例向“常用”工具栏中添加“文件版本”按钮。该命令栏自定义方案保存于活动文档所用的模板中。

示例代码
CustomizationContext = ActiveDocument.AttachedTemplate
Application.CommandBars("Standard").Controls.Add(msoControlButton,2522,null,8)

customization context


请参阅