Catch all closing events

M

MiK@GenApi

Hi everybody

I'm working with a Word application in which I have to catch all the closing
events. So I'm overriding all the Word closing built-in commands as DocClose,
FileClose, FileCloseOrExit, FileCloseOrCloseAll, FileExit and FileCloseAll,
and all those ones work fine.

But I've been searching a long time and didn't find which built-in command
is assigned to the closing event from the right top most "X" into the
application window tile bar.

The small "x" just above the "big one" is assigned to the DocClose built-in
command and works.

Any help would be quite appreciated.

Thank's for your answers.
 
J

Jay Freedman

You appear to have missed the Quit event
(http://msdn2.microsoft.com/en-us/library/aa140279(office.10).aspx).

If the "Windows in Taskbar" option is turned on, the Quit event will fire
for the big "x" only when it's closing the last (or only) document; if the
option is turned off, the event will fire whenever the big "x" is clicked.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
M

MiK@GenApi

hi jay, thank's for your answer but I think I've not been clear enough in
describing my problem... in fact I do not really need to manage the quit
event : my real problem is when I click on the big "X", it doesn't fire any
close event on my document. In place of that, Word prompts the filesave
dialog box instead of calling my code (FileClose, DocClose, etc. ...)

hope you see what I mean
 
M

MiK@GenApi

ok this fake code seems to be very interesting, gonna try it as soon as
possible and keep you up

thank's for that
 

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