全部显示

DisplayAlerts 属性

       

设置或返回 PpAlertLevel 类型常数,该常数代表 Microsoft PowerPoint 在运行宏时是否显示警告。可读写。

expression.DisplayAlerts

expression  必选。该表达式返回一个 Application 对象。

说明

一旦宏停止运行,则 DisplayAlerts 属性的值无法重新设置;该值将在会话过程中保持不变。在会话过程之间不会保存该值,所以在 PowerPoint 开始运行时,该值重新设置为 ppAlertsNone

示例

以下一行代码通知 PowerPoint 显示所有的消息框和警告,并将错误返回宏。

Sub SetAlert
    Application.DisplayAlerts = ppAlertsAll
End Sub