Board index » delphi » Word Document Close event not fired

Word Document Close event not fired

I tried to handle the document closing in MS Word using EventSinkImp (thanks
to dear Binh Ly) but when I close document it never fires. Though I can
handle Word Application Quit  and DocumentChange events successfully. I've
heard about some problems in Word's event firing mechanism. Is there a way
to solve this problem?
 

Re:Word Document Close event not fired


Quote
vavan <va...@santel.ru> wrote in message

news:85ppdb$aht1@bornews.borland.com...

Quote
> I tried to handle the document closing in MS Word using EventSinkImp
(thanks
> to dear Binh Ly) but when I close document it never fires. Though I can
> handle Word Application Quit  and DocumentChange events successfully. I've
> heard about some problems in Word's event firing mechanism. Is there a way
> to solve this problem?

You are right - there are inconsistencies. My classes can optionally trap
events (using code similar to Binh Ly). Since they store information on
every document present, they can generate more consistent and meaningful
events. You wish to try them to see if they help.
Another line of attack is to override the File close and File Exit menus
with your own Word macros and from there inform your application that a
document is about to close.

--
Regards

Allan Harkness
Check my Word Components at:
http://www.atheroma.freeserve.co.uk/

Re:Word Document Close event not fired


I've noticed these problems as well as others who have written to me.
Perhaps your best bet is to call MS tech support and ask them why. Or try
the MS newsgroups to see if anybody knows.

have fun
--
Binh Ly
Need help on COM development?
http://www.techvanguards.com

Quote
vavan <va...@santel.ru> wrote in message

news:85ppdb$aht1@bornews.borland.com...
Quote
> I tried to handle the document closing in MS Word using EventSinkImp
(thanks
> to dear Binh Ly) but when I close document it never fires. Though I can
> handle Word Application Quit  and DocumentChange events successfully. I've
> heard about some problems in Word's event firing mechanism. Is there a way
> to solve this problem?

Other Threads