Share via


_Application.EnableCancelKey Property

Returns or sets the way that Word handles CTRL+BREAK user interruptions.

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

Syntax

'Declaration
Property EnableCancelKey As WdEnableCancelKey
    Get
    Set
'Usage
Dim instance As _Application
Dim value As WdEnableCancelKey

value = instance.EnableCancelKey

instance.EnableCancelKey = value
WdEnableCancelKey EnableCancelKey { get; set; }

Property Value

Type: Microsoft.Office.Interop.Word.WdEnableCancelKey

Remarks

Use this property very carefully. If you use wdCancelDisabled, there's no way to interrupt a runaway loop or other non – self-terminating code. Also, the EnableCancelKey property is not reset to wdCancelInterrupt when your code stops running; unless you explicitly reset its value, it will remain set to wdCancelDisabled for the duration of the Word session.

See Also

Reference

_Application Interface

_Application Members

Microsoft.Office.Interop.Word Namespace