Can I get Word to warn me if 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. At least, I cannot see any connection with anything else that is going on. If I close the document and immediately reopen it, it is rarely read-only the second time and I can proceed.

 

The problem is not so much that it is opened read-only, but that I don't notice it, so I go about merrily on editing the document. When I try to save it, I get the Save As dialog. Then I have to save it under a different name, delete the old copy, and rename the new one. In addition to a being 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? If I could just get a warning, I could avoid making a lot of changes that I cannot save.

If there is no setting for this, can I write a macro that runs every time a document is opened, checks for the read-only status, and puts up a MsgBix or something? If this is possible, can someone show m the necessary code and where to put it?

 

Thanks

Answer
Answer

Create a procedure called AutoOpen. It fires no matter what template has been used for the document. Place the procedure in a Module.

Sub AutoOpen()
   If ActiveDocument.ReadOnly = True Then
      MsgBox "This document is read only."
   End If
End Sub

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 5, 2021 Views 131 Applies to: