为指定的键返回组合键字符串(例如,Ctrl+Shift+A)。
expression.KeyString(KeyCode, KeyCode2)
KeyCode Long 类型,必需。用 WdKey 常量指定的一个键。
KeyCode2 Variant 类型,可选。用 WdKey 常量指定的第二个键。
可用 BuildKeyCode 方法创建 KeyCode 或 KeyCode2 参数。
本示例为 wdKeyControl、wdKeyShift 和 wdKeyA 等 WdKey 常量显示组合键字符串 (Ctrl+Shift+A)。
CustomizationContext = ActiveDocument.AttachedTemplate
MsgBox KeyString(KeyCode:=BuildKeyCode(wdKeyControl, _
wdKeyShift, wdKeyA))