Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

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


  • Please log in to reply
1 reply to this topic

#1 Cynthia Moore

Cynthia Moore

  • Members
  • 300 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:11:29 PM

Posted 07 November 2014 - 11:18 AM

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?

 

Thanks


Running Win 10 & Office 365.


BC AdBot (Login to Remove)

 


#2 Cynthia Moore

Cynthia Moore
  • Topic Starter

  • Members
  • 300 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:11:29 PM

Posted 07 November 2014 - 01:05 PM

I did a little more research and found this website:

 

http://stackoverflow.com/questions/12630878/word-vba-document-readonly-status-incorrectly-returns-false

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."
'UserForm1.Show
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?


Running Win 10 & Office 365.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users