KeyBinding Members (Word)

Represents a custom key assignment in the current context. The KeyBinding object is a member of the KeyBindings collection.

Methods

Name

Description

Clear

Removes the specified key binding from the KeyBindings collection and resets a built-in command to its default key assignment.

Disable

Removes the specified key combination if it is currently assigned to a command. After you use this method, the key combination has no effect.

Execute

Runs the command associated with the specified key combination.

Rebind

Changes the command assigned to the specified key binding.

Properties

Name

Description

Application

Returns an Application object that represents the Microsoft Word application.

Command

Returns the command assigned to the specified key combination. Read-only String.

CommandParameter

Returns the command parameter assigned to the specified shortcut key. Read-only String.

Context

Returns an Object that represents the storage location of the specified key binding. Read-only.

Creator

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

KeyCategory

Returns the type of item assigned to the specified key binding. Read-only WdKeyCategory.

KeyCode

Returns a unique number for the first key in the specified key binding. Read-only Long.

KeyCode2

Returns a unique number for the second key in the specified key binding. Read-only Long.

KeyString

Returns the key combination string for the specified keys (for example, CTRL+SHIFT+A). Read-only String.

Parent

Returns an Object that represents the parent object of the specified KeyBinding object.

Protected

True if you cannot change the specified key binding in the Customize Keyboard dialog box. Read-only Boolean.