Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
up vote 7 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

    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
    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
    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 '14 at 17:24

    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:

    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.

    -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

    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
      @="[AppShow][REM _DDE_ReadWriteOnSave][FileOpen .Name="%1",.ReadOnly=1]"
      @="[AppShow][REM _DDE_ReadWriteOnSave][FileOpen .Name=\"%1\",.ReadOnly=1]"

    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

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

    share|improve this answer

    Another option if you are opening the file in an Office program is to follow the MS instructions.

    • Open the Office program you need
    • Click the Office button, and Open
    • Browse to the file you want to open and select it
    • On the Open button at the bottom, click the arrow and choose "Open as Read-Only"

    I tried this with Excel and it actually opened the file as read-only.

    When using the Shift+Right Click, the "Open as Read Only" option in Explorer seemed to have no effect. I do not see an "Open in Protected View" option.

    My whole reason for opening the file as read-only is so others can edit it while I have it open, so making the file read-only won't work.

    I also don't want to go through 18 steps to add an action, or edit the registry (not even sure I'm allowed to at work).

    I know this isn't technically opening it from Windows Explorer, but lots of people (like me) get here from Google and want to open something in an Office program.

    share|improve this answer

    I agree with music2myear, unless there are other users that prohibit this, the proper and easiest way would be to:

    • right click on the folder
    • go to properties
    • select read only
    • Apply to all sub folders.
    share|improve this answer

    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. It should work for Word and Excel files.

    share|improve this answer
    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… – James Jun 27 '13 at 21:44

    You must log in to answer this question.

    Not the answer you're looking for? Browse other questions tagged .