Board index » delphi » Word - closing of a document

Word - closing of a document

I open Word in my application :
wWord:=CreateOleObject('Word.Application');

How can I make disable the closing of a document in Word (cross in top on
the right)

Thanks.

 

Re:Word - closing of a document


<<Tom:
How can I make disable the closing of a document in Word
(cross in top on the right)

Quote

You need to trap the DocumentBeforeClose event and set its
Cancel parameter to true. For that you can either use the
server components in D7 (/not/ earlier versions of Delphi),
or Binh Ly's EventSinkImp utility:
http://www.techvanguards.com/

--
Deborah Pate (TeamB) http://delphi-jedi.org

  TeamB don't see posts sent via Google or ISPs
  Use the real Borland server: newsgroups.borland.com
  http://www.borland.com/newsgroups/genl_faqs.html

Re:Word - closing of a document


Thanks a lot

"Deborah Pate (TeamB)" <d.p...@blueyonder.co.not-this-bit.uk> a crit dans
le message de news: VA.00001c63.085b3__BEGIN_MASK_n#9g02mG7!__...__END_MASK_i?a63jfAD$z__@blueyonder.co.not-this-bit.uk...

Quote
> <<Tom:
> How can I make disable the closing of a document in Word
> (cross in top on the right)

> You need to trap the DocumentBeforeClose event and set its
> Cancel parameter to true. For that you can either use the
> server components in D7 (/not/ earlier versions of Delphi),
> or Binh Ly's EventSinkImp utility:
> http://www.techvanguards.com/

> --
> Deborah Pate (TeamB) http://delphi-jedi.org

>   TeamB don't see posts sent via Google or ISPs
>   Use the real Borland server: newsgroups.borland.com
>   http://www.borland.com/newsgroups/genl_faqs.html

Other Threads