To create a key binding and add it to the KeyBindings collection, use the Add method of the KeyBindings collection. The syntax for this Add method is:
KeyCategory, Command, KeyCode, KeyCode2, CommandParameter)
The parameters of this method are described in detail later in this chapter, since they are also properties of the KeyBinding object.
To illustrate, the following code:
KeyBindings.Add wdKeyCategoryFont, "Arial", _ BuildKeyCode(wdKeyAlt, wdKey9)
adds a new key binding with shortcut key Alt-9, whose command changes the font to Arial.