[python-win32] launching Word with COM..how to tell when it's closed?

David Primmer dave@primco.org
Thu, 4 Apr 2002 02:53:34 -0800


I have a wxWindows application that is starting a Word session from a
button click with self.w = win32com.client.Dispatch("Word.Application")
and I'd like to have Word be "modal" so that the user cannot do anything
in my app while Word is open (I'm editing data with it). Is there any
event that Word would trigger that I could capture to know when the user
has saved and closed Word? 

I can test for the presence of the Word object within my program but I'm
guessing that would require some kind of polling mechanism (I'm not sure
how to do that either). 

Would I have to make my app a COM server and then send a message from
Word when it closes? Don't really want to mess with something like that.

Any ideas are appreciated. Thanks.

davep