Powerpoint Beforeclose Event or equivalent

J

John Galt

HI all,

I'm writting a document management system that indexes and then stores the
documents in a database and opens them from the database to that end I've
been using the BeforeSave and BeforeClose events on Word and Excel to
intercept the saving and the closing so that I can store it in the database.
Obviously it would be better if there was an aftersave and afterclose and the
close event actually fired after the save if the user is prompted to save on
close, but hey, I got around it.

Now I'm working on trying to get powerpoint to do the same thing. The
problem is that there doesn't appeare to be a cancelable Close or BeforeClose
event (there is a save one) so that I can intercept the close, prompt for my
own save prompt and then save the power point, load it into the database and
then clean up the file again so that it isn't left on the hard drive.

Does anyone know of any way to get a BeforeClose event in the PIAs?

Thanks!
 
S

Steve Rindsberg

John Galt said:
HI all,

I'm writting a document management system that indexes and then stores the
documents in a database and opens them from the database to that end I've
been using the BeforeSave and BeforeClose events on Word and Excel to
intercept the saving and the closing so that I can store it in the database.
Obviously it would be better if there was an aftersave and afterclose and the
close event actually fired after the save if the user is prompted to save on
close, but hey, I got around it.

Now I'm working on trying to get powerpoint to do the same thing. The
problem is that there doesn't appeare to be a cancelable Close or BeforeClose
event (there is a save one) so that I can intercept the close, prompt for my
own save prompt and then save the power point, load it into the database and
then clean up the file again so that it isn't left on the hard drive.

Does anyone know of any way to get a BeforeClose event in the PIAs?

There may be one in 2007 but ISTR a friend telling me he had to accomplish this
in earlier versions by:

Trapping the close event
Grabbing the name of the file (which should still be available at that point)
Reopening the just-closed file (possibly w/o a window so it doesn't prompt the
user to call in an exorcist)
Doing what's needed
Saving again (setting a flag to let the close event handler know it's you and to
let this one go)
 

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