Returns or sets the way certain alerts and messages are handled while a macro is running. Read/write Long.
Can be one of the following WdAlertLevel constants.
Constant | Description |
---|---|
wdAlertsNone | No alerts or message boxes are displayed. If a macro encounters a message box, the default value is chosen and the macro continues. |
wdAlertsMessageBox | Only message boxes are displayed; errors are trapped and returned to the macro. |
wdAlertsAll | All message boxes and alerts are displayed; errors are returned to the macro. |
Note If you set this property to wdAlertsNone or wdAlertsMessageBox, Word doesn't set it back to wdAlertsAll when your macro stops running. You should write your macro in such a way that it always sets the DisplayAlerts property back to wdAlertsAll when it stops running.