KeyBinding.Rebind Method
Word Developer Reference |
Changes the command assigned to the specified key binding.
Syntax
expression.Rebind(KeyCategory, Command, CommandParameter)
expression Required. A variable that represents a KeyBinding object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
KeyCategory | Required | WdKeyCategory | The key category of the specified key binding. |
Command | Required | String | The name of the specified command. |
CommandParameter | Optional | Variant | Additional text, if any, required for the command specified by Command. For information about values for this argument, see the Add method. |
Example
This example reassigns the CTRL+SHIFT+S key binding to the FileSaveAs command.
Visual Basic for Applications |
---|
|
This example rebinds all keys assigned to the macro named "Macro1" to the macro named "ReportMacro."
Visual Basic for Applications |
---|
|
See Also