Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there an easy way to open a file as read-only from Windows Explorer?

My inmediate interest is in a Microsoft Access file. I am doing some sanity checks in old MS Access databases and I see that their date is automatically updated when I open them. I don't like this, since it will look like all the old files have been modified today.

I am working with Windows XP.

Update: As Yoda said,

No. Try not. Do... or do not. There is no try.

In my case, it was "do not". I ended up copying the entire (big) folder tree to MyDocuments, and then opening all the databases from there.

share|improve this question
1  
Is there a reason you cannot simply add the read-only flag to the file? Right-click, select Properties, check the Read Only box. –  music2myear Sep 30 '11 at 20:13
    
@music2myear Now (2 years later ;) I think you are right, this was the right approach. –  Daniel Daranas Sep 30 '11 at 20:46
add comment

5 Answers

up vote 6 down vote accepted

  • Open Windows Explorer.
  • Choose Folder Options from the View menu. (In some versions of Windows you choose Options from the View menu.) Windows displays the Folder Options (or just plain Options) dialog box.
  • Make sure the File Types tab is selected. (Click here to see a related figure.) In the list of Registered File Types, locate and select Microsoft Word Document. Click on the Edit button. Windows displays the Edit File Type dialog box. (Click here to see a related figure.)
  • Select the Open option in the Actions list.
  • Click on Advanced. The Edit File Type dialog box appears.
  • Click on Open in the Actions field.
  • Click on Edit. The Editing Action dialog box appears.
  • Select the contents of the Application Used to Perform Action box. (Click here to see a related figure.)
  • Press CTRL+C. This copies the contents of the Application Used to Perform Action box.
  • Click on Cancel.
  • Click the New button. Windows displays the New Action dialog box.
  • In the Action box, enter the name you want to appear in the shortcut menu. For instance, you could type Open Read-Only.
  • Position the insertion point in the Application Used to Perform Action box and press CTRL+V. The information you copied in step 8 is pasted into the box.
  • Select the Use DDE check box. The New Action dialog box expands.
  • In the DDE Message box, enter the following text: [FileOpen ("""%1"""),.ReadOnly]
  • In the Application box, enter this single word: WinWord.
  • In the Topic box, enter this single word: System.
  • Click Close or OK as necessary to dismiss all the dialog boxes.

  • share|improve this answer
        
    Thanks for your response. I tried to use it, changing WinWord to MsAccess. After right-clicking the file and selecting my new action "Open read-only", this message appears: Microsoft Office Access can't find the macro 'FileOpen("""K:\MyLongishPath... The message is actually trimmed. –  Daniel Daranas Sep 29 '09 at 12:58
    add comment

    I had the same problem on Windows 7. The above answer doesn't work for W7 because the interface for file associations has changed. The good news is that Open as Read-Only is now a simpler process.

    Shift + Right-Click -> Open as Read-Only

    share|improve this answer
    1  
    this doesn't solve the issue, however I used right-click, open as read only, msword still open files NORMALLY :( –  LongTTH Oct 2 '12 at 15:33
    1  
    FYI, for those who got here via Google, shift-right click and "Open in Protected View" works. The open as read only seems to do nothing. Tested in Windows 7/Office 2010 –  agrothe Apr 24 at 17:24
    add comment

    Found read-only option in program, did the following, but apparently did something wrong. Please let me know if you can correct.

    In Windows xp, Explorer 8 -Selected Tools -Folder Options -File types tab -Selected Microsoft Word Document -Clicked on Advanced [Edit File Type box came up] -In Actions box selected open as read-only -Clicked OK -Clicked Edit

    • Box entitled "Editing Action for Type Microsoft Word Docu . . . contained following information:

      Action: Open as Read-Only

      Application used to perform action: "C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE" /h /n /dde

      DDE message: [AppShow][REM _DDE_ReadWriteOnSave][FileOpen .Name="%1",.Revert=0]

      Application: WinWord

      DDE application Not Running: [blank]

      Topic: System

    -Clicked OK all the way through.

    -Went to Explorer and right-clicked on a Word document, the read-only option was now in the menu, clicked on it with the following results:

    Error
    The command cannot be opened because a dialog box is open.  Click OK, and then close the dialog boxes to continue.
    
    Clicked ok
    
    Got second error
        Word experienced an error trying to open the file.
        Try these suggestions.
            *Check the file permissions for the document or drive.
            *Make sure there is sufficient memory or disk space.
            *Open the file with the text recovery converter.
            (F:\24th)
    

    -Clicked Show Help

    The file you tried to open was not found. It may be missing, in a different location, locked by another application, or unavailable due to file permissions. If you are sure the file exists but you cannot locate it using the Word File Open dialog, start Microsoft Windows Explorer and perform a search. If the search dialog returns a listing of your file, double-click on it to open it. If the file does not open, it is either corrupt, locked by another application, or is protected by file permissions.
    
    -Clicked OK
    -Filed opened, but not as read-only.
    
    -Tried another document, and this one opened immediately, but not as read-only.
    
    share|improve this answer
    add comment

    This is what worked for me on Windows 7, after reading this and similar threads:

    For Word:

    • Edit your HKEY_CLASSES_ROOT\Word.Document.12\shell\OpenAsReadOnly\command keys such that the "%1" in both subentries is replaced by /dde, if it did not already say so
    • Again for Word2003 documents: Edit HKEY_CLASSES_ROOT\Word.Document.8\shell\OpenAsReadOnly\command like above
    • Import the following reg file or compare with your registry:

      Windows Registry Editor Version 5.00
      
      [HKEY_CLASSES_ROOT\Word.Document.12\shell\OpenAsReadOnly\ddeexec]
      @="[AppShow][REM _DDE_ReadWriteOnSave][FileOpen .Name="%1",.ReadOnly=1]"
      
      [HKEY_CLASSES_ROOT\Word.Document.12\shell\OpenAsReadOnly\ddeexec\Application]
      @="WinWord"
      
      [HKEY_CLASSES_ROOT\Word.Document.12\shell\OpenAsReadOnly\ddeexec\IfExec]
      @=""
      
      [HKEY_CLASSES_ROOT\Word.Document.12\shell\OpenAsReadOnly\ddeexec\Topic]
      @="System"`
      
      [HKEY_CLASSES_ROOT\Word.Document.8\shell\OpenAsReadOnly\ddeexec]
      @="[AppShow][REM _DDE_ReadWriteOnSave][FileOpen .Name=\"%1\",.ReadOnly=1]"
      
      [HKEY_CLASSES_ROOT\Word.Document.8\shell\OpenAsReadOnly\ddeexec\Application]
      @="WinWord"
      
      [HKEY_CLASSES_ROOT\Word.Document.8\shell\OpenAsReadOnly\ddeexec\IfExec]
      @=""
      
      [HKEY_CLASSES_ROOT\Word.Document.8\shell\OpenAsReadOnly\ddeexec\Topic]
      @="System"`
      

    For Excel:

    • Like word, make sure the commands under HKEY_CLASSES_ROOT\Excel.Sheet.12 and HKEY_CLASSES_ROOT\Excel.Sheet.8 have the /dde parameter (was the case for me already)
    • Import the following reg file or compare with your registry:

      Windows Registry Editor Version 5.00
      
      [HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\OpenAsReadOnly\ddeexec]
      @="[open("%1",,1)]"
      
      [HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\OpenAsReadOnly\ddeexec\application]
      @="Excel"
      
      [HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\OpenAsReadOnly\ddeexec\topic]
      @="system"
      
      [HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\OpenAsReadOnly\ddeexec]
      @="[open("%1",,1)]"
      
      [HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\OpenAsReadOnly\ddeexec\application]
      @="Excel"
      
      [HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\OpenAsReadOnly\ddeexec\topic]
      @="system"
      

    It should work similarly for the other Office types, but I did not try that.

    share|improve this answer
    add comment

    Instead of Shift+Right-Click -> Open as Read Only, use Open in Protected View. Seems to do what's needed and prevents editing of the document. (At least for Word docs?)

    share|improve this answer
    1  
    have you actually tried this? if not, probably not worth posting as an answer especially on a question from 2009. FWIW the answer is probably more likely to be found here office.microsoft.com/en-gb/access-help/… –  James Jun 27 '13 at 21:44
    add comment

    Your Answer

     
    discard

    By posting your answer, you agree to the privacy policy and terms of service.

    Not the answer you're looking for? Browse other questions tagged or ask your own question.