Propiedad KeyBinding.KeyCategory (Word)

Devuelve el tipo de elemento asignado a la combinación de teclas especificada. De sólo lectura WdKeyCategory.

Sintaxis

expresión. KeyCategory

expresión obligatoria. Variable que representa un objeto 'KeyBinding'.

Ejemplo:

En este ejemplo, se muestran las teclas asignadas a los nombres de fuentes. Si no se han asignado teclas a las fuentes, se muestra un mensaje.

Dim kbLoop As KeyBinding 
Dim intCount As Integer 
 
intCount = 0 
 
For Each kbLoop In KeyBindings 
 If kbLoop.KeyCategory = wdKeyCategoryFont Then 
 intCount = intCount + 1 
 MsgBox kbLoop.Command & vbCr & kbLoop.KeyString 
 End If 
Next kbLoop 
 
If intCount = 0 Then _ 
 MsgBox "Keys haven't been assigned to fonts"

Consulte también

Objeto KeyBinding

Soporte técnico y comentarios

¿Tiene preguntas o comentarios sobre VBA para Office o esta documentación? Vea Soporte técnico y comentarios sobre VBA para Office para obtener ayuda sobre las formas en las que puede recibir soporte técnico y enviar comentarios.