Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Menus and Toolbars / January 2004

Tip: Looking for answers? Try searching our database.

Prevent Document Close in Microsoft Word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Zohar Rennert - 26 Jan 2004 17:18 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.