DisplayAlerts Property
TOC
Collapse the table of content
Expand the table of content

Application.DisplayAlerts Property (Word)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

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

expression .DisplayAlerts

expression Required. A variable that represents an Application object.

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
Show:
© 2016 Microsoft