如何像 Word & 一样取消 PowerPoint 的关闭事件在 PIA 中表现出色? [英] How to cancel the close event for PowerPoint like in Word & Excel in PIA?

查看:38
本文介绍了如何像 Word & 一样取消 PowerPoint 的关闭事件在 PIA 中表现出色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Microsoft Word 关闭时,可以取消关闭事件.Excel 也是如此.

When Microsoft Word is closed, the close event can be canceled. The same is for Excel.

但是 PowerPoint 关闭事件没有取消标志.

But the PowerPoint close event doesn't have cancel flag.

是否可以通过其他方式取消活动?

Is it possible to cancel the event in any other way?

推荐答案

在关闭事件中,您可以将文档设置为 Saved = False,这将强制 PowerPoint 询问用户是否愿意使用 Yes-No-Cancel 消息框保存文件.

In the close event you can set the document to Saved = False, this will force PowerPoint to ask the user if he wants to save the file with a Yes-No-Cancel message box.

在事件结束前使用SendKeys({ESC}),它会发送escape到消息框,关闭事件将被取消.

Using SendKeys({ESC}) just before the end of the event, it will send escape to the message box, and the close event will be canceled.

这篇关于如何像 Word & 一样取消 PowerPoint 的关闭事件在 PIA 中表现出色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆