How do I disable closing a document from within MS Word?
I tried the following:
Sub Document_Close()
On Error GoTo ErrClose
Err.Raise 1, , "Must close application from outside"
ErrClose:
MsgBox ("Error: " & Err.Description)
End Sub
However, I see the error message and still I am prompted
for saving the changes and losing the document.
Jay Freedman - 26 Jan 2004 18:30 GMT
Hi, Zohar,
Try the scheme described here:
http://word.mvps.org/FAQs/MacrosVBA/PseudoBeforeClose.htm

Signature
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
> How do I disable closing a document from within MS Word?
>
[quoted text clipped - 9 lines]
> However, I see the error message and still I am prompted
> for saving the changes and losing the document.