Protected Property

Microsoft Word Visual Basic

expression.Protected

expression    Required. An expression that returns a KeyBinding object.

Remarks

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