Application.DisplayAlerts property (Word)

Returns or sets the way certain alerts and messages are handled while a macro is running. Read/write WdAlertLevel.

Syntax

expression. DisplayAlerts

expression Required. A variable that represents an Application object.

Example

This example sets Word to display all alerts and message boxes when it is running macros.

Application.DisplayAlerts = wdAlertsAll

This example returns the current setting of the DisplayAlerts property.

Dim lngTemp As Long 
 
lngTemp = Application.DisplayAlerts

See also

Application Object

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.