KeysBoundTo.Key Method

Returns a KeyBinding object that represents the specified custom key combination. If the key combination doesn't exist, this method returns Nothing.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
Function Key ( _
    KeyCode As Integer, _
    ByRef KeyCode2 As Object _
) As KeyBinding
'Usage
Dim instance As KeysBoundTo
Dim KeyCode As Integer
Dim KeyCode2 As Object
Dim returnValue As KeyBinding

returnValue = instance.Key(KeyCode, KeyCode2)
KeyBinding Key(
    int KeyCode,
    ref Object KeyCode2
)

Parameters

  • KeyCode
    Type: System.Int32
    Required Integer. A key you specify by using one of the WdKey constants.
  • KeyCode2
    Type: System.Object%
    Optional Object. A second key you specify by using one of the WdKey constants.

Return Value

Type: Microsoft.Office.Interop.Word.KeyBinding

Remarks

You can use the BuildKeyCode method to create the KeyCode or KeyCode2 argument.

See Also

Reference

KeysBoundTo Interface

KeysBoundTo Members

Microsoft.Office.Interop.Word Namespace