Command Property Example

This example displays the keys assigned to font names. A message is displayed if no keys have been assigned to fonts.

For Each aKey In KeyBindings
    If aKey.KeyCategory = wdKeyCategoryFont Then
        Count = Count + 1
        MsgBox aKey.Command & vbCr & aKey.KeyString
    End If
Next aKey
If Count = 0 Then MsgBox "Keys haven't been assigned to fonts"