Cancelling a PowerPoint close event

G

Guest

I am automating PowerPoint from another application. When a PowerPoint
application is open and the user selects the 'X' button to close the window,
I would like to be able to catch this event and cancel (not allow) the close.
(I want to handle all File events from my own application). For Word and
Excel, a DocumentBeforeClose event is caught which allows the close to be
cancelled. I haven't found any way of doing this for PowerPoint. Is there a
way to programmatically catch and cancel the close that results from
selecting the 'X' button when automating PowerPoint, or disabling the 'X'
button?

Thanks, Stumpiana
 
S

Shyam Pillai

You can do it by subclassing the PowerPoint window and capture the messages
yourself. The PresentationClose event is very limited.
 
G

Guest

Can PowerPoint be subclassed in VB? If so, do you know which messages I
would be looking for?
Thanks, Stumpiana
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top