KeyBinding.Protected property (Word)
True if you cannot change the specified key binding in the Customize Keyboard dialog box. Read-only Boolean.
Syntax
expression. Protected
expression An expression that returns a 'KeyBinding' object.
Remarks
You can access the Customize Keyboard dialog box from the Tools menu; click Customize, and then click the Keyboard button.
Use the Add method of the KeyBindings object to add a key binding regardless of the protected status.
Example
This example displays the protection status for the CTRL+S key binding.
CustomizationContext = ActiveDocument.AttachedTemplate
MsgBox FindKey(BuildKeyCode(wdKeyControl, wdKeyS)).Protected
This example displays a message if the A key binding is protected.
CustomizationContext = NormalTemplate
If FindKey(BuildKeyCode(wdKeyA)).Protected = True Then
MsgBox "The A key is protected"
End If
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for