Application.DisplayAlerts Property

Word Developer Reference

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.

Visual Basic for Applications
  Application.DisplayAlerts = wdAlertsAll

This example returns the current setting of the DisplayAlerts property.

Visual Basic for Applications
  Dim lngTemp As Long

lngTemp = Application.DisplayAlerts

See Also