View Full Version : Can I get Word 2007 to warn me when a document is opened read only?

From time to time, when I open a Word document, it is opened read only. I have no idea why this happens. It is fairly infrequent (3-4 times a month) and seems random.

The problem is that I don't notice that it's read only, so I go about merrily on editing the document. When I try to save it, I get the Save As dialog. In then have to save it under a different name, delete the old copy, and rename the new one. In addition to a royal pain, it screws up my archive log.

Is there a way that I can have Word warn me whenever a document is opened read only?


I did a little more research and found this website:


It has a document_open macro which I adapted as follows:

Sub Document_Open()
If ThisDocument.ReadOnly = False Then Exit Sub
MsgBox "This document is read only."
End Sub

I saved it in a Normal code module and set a breakpoint. It does get executed every time a document is opened, but the readonly test is always False, even when the document has the Read Only flag set and the title bar clearly says "(Read Only)".

Is there a way to modify this macro so that the MsgBox statement will execute when a document is opened read only?