Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to cancel the close event for PowerPoint like in Word & Excel in PIA?

Tags:

powerpoint

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

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

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

like image 950
vakuras Avatar asked Jan 22 '23 08:01

vakuras


1 Answers

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.

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.

like image 98
Dani Avatar answered Apr 07 '23 20:04

Dani