Share via


_Application.DisplayAlerts Property

Sets or returns whether Microsoft PowerPoint displays alerts while running a macro. Read/write.

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

Syntax

'Declaration
Property DisplayAlerts As PpAlertLevel
    Get
    Set
'Usage
Dim instance As _Application
Dim value As PpAlertLevel

value = instance.DisplayAlerts

instance.DisplayAlerts = value
PpAlertLevel DisplayAlerts { get; set; }

Property Value

Type: Microsoft.Office.Interop.PowerPoint.PpAlertLevel

Remarks

The value of the DisplayAlerts property is not reset once a macro stops running; it is maintained throughout a session. It is not stored across sessions, so when PowerPoint begins, it is reset to ppAlertsNone.

The value of the DisplayAlerts property can be one of these PpAlertLevel constants.

Constant

Description

ppAlertsAll

All message boxes and alerts are displayed; errors are returned to the macro.

ppAlertsNone

The default. No alerts or message boxes are displayed. If a macro encounters a message box, the default value is chosen and the macro continues.

See Also

Reference

_Application Interface

_Application Members

Microsoft.Office.Interop.PowerPoint Namespace