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.

  • 2
    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

  • Open Windows Explorer.
  • Choose Folder Options from the View menu. (In some versions of Windows you choose Options from the View menu, or Folder Options from the Tools 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.

    • 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
    • 7
      This does NOT fall under "easy way". – Shadow Wizard is Ear For You Nov 30 '17 at 8:02

    I had the same problem on Windows 7. The above answer doesn't work for Windows 7 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 or hit F10 -> click Open as Read-Only

    | improve this answer | |
    • 6
      this doesn't solve the issue, however I used right-click, open as read only, msword still open files NORMALLY :( – Luke Oct 2 '12 at 15:33
    • 14
      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 – Andrew Grothe Apr 24 '14 at 17:24
    • 1
      I tried opening an Excel file in Office 2016 as "read-only" and it let me make a change and save... oops. "Protected view" worked as expected though. – Jeff B Feb 13 '17 at 21:16

    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.

    | improve this answer | |
    • 2
      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
    • @James The link is broken... also this answer seems to be posted in response to deficiencies in this other answer on this question. – Jeff B Feb 13 '17 at 21:20
    • Still works with Excel 2016 – Vitor Canova Jul 9 at 17:29

    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.

    | improve this answer | |

    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.
    | 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.

    | 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.
    | improve this answer | |

    My problem is that the shift+right-click "Open as Read only" option wasn't working.
    I tried the registry edit solution here for windows 7:
    (Note: an answer in the linked thread also references this question)

    But I ended up solving this by changing the default value of the key
    (Note: Excel.Sheet.12 corresponds to xlsm files in my case, you will probably have to change it for other file types.)
    "C:\Program Files (x86)\Microsoft Office\Root\Office16\EXCEL.EXE" /h "%1"
    "C:\Program Files (x86)\Microsoft Office\Root\Office16\EXCEL.EXE" /r "%1"


    Per the docs, the /h command line switch opens word documents read-only (in sharepoint?), but for excel it's /r.

    Something I didn't try

    Repair ms office using the installer.

    Update 2020-01-17

    After reinstalling ms office, these registry keys were reset. As it turns out, my original response omitted an important step!
    Per the response I originally referred to:

    In the ddeexec key, you need to change the default value to: [open("%1",,1)]

    In the course of making the registry updates, I found a tool called RegScanner that made it so much easier to find the registry keys.
    Here are the search settings I used (screenshot of search):

    • Find String: Excel.*OpenAsReadOnly\\command
    • Matching: Registry item contains the specified regular expression
    • Look at: Keys
    • Check Scan the following base keys: and select:HKEY_CLASSES_ROOT

    You can double click on each search result to jump to that key in regedit.

    | improve this answer | |

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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