Open MS Office Files in Read-Only Mode in LibreOffice

Configuring LibreOffice to open Microsoft Office files (such as DOCX, XLSX, and PPTX) in read-only mode by default helps prevent accidental modifications and maintains document integrity. This guide explains how to set up read-only access globally through system launch flags, advanced LibreOffice settings, and file open options.


Method 1: Change File Associations to Launch with the Read-Only Flag

The most reliable way to force LibreOffice to open Microsoft Office formats in read-only mode by default is to update your operating system’s file association commands with the --view (or -R) parameter.

On Windows:

  1. Press Win + R, type regedit, and press Enter to open the Registry Editor.
  2. Navigate to the file extension handler for the desired Microsoft Office format (for example, .docx typically routes through LibreOffice.Docx or Applications\soffice.exe).
  3. Locate the shell\open\command key.
  4. Double-click the (Default) value string.
  5. Add --view before the file path parameter.
    • Example: "C:\Program Files\LibreOffice\program\soffice.exe" --view "%1"
  6. Repeat this process for other extensions (such as .xlsx and .pptx).

On Linux:

  1. Open or create a custom desktop entry in ~/.local/share/applications/ (e.g., libreoffice-view.desktop).

  2. Copy the contents of /usr/share/applications/libreoffice-writer.desktop.

  3. Modify the Exec line to include the --view flag:

    Exec=libreoffice --view %U
  4. Set this desktop entry as the default application for Microsoft Office MIME types in your desktop environment’s settings.


Method 2: Configure Read-Only Settings via LibreOffice Expert Configuration

LibreOffice provides internal settings to control document handling and write permissions:

  1. Open LibreOffice.
  2. Navigate to Tools > Options (on macOS: LibreOffice > Preferences).
  3. In the left panel, expand LibreOffice and select Advanced.
  4. Click the Open Expert Configuration button.
  5. In the search bar at the top, type ReadOnly and press Enter.
  6. Review the properties under org.openoffice.Office.Common:
    • Look for security policies and filter flags associated with external document imports.
    • Double-click Boolean properties to toggle their values as needed to restrict editing permissions for foreign file formats.
  7. Click OK and restart LibreOffice.

Method 3: Opening Files Manually in Read-Only Mode

If you do not want to alter system-wide associations, you can open documents in read-only mode directly from within the application:

  1. In LibreOffice, go to File > Open.
  2. Select the Microsoft Office document you wish to view.
  3. In the bottom-right corner of the file chooser dialog, check the Read-only box.
  4. Click Open.

To edit a file opened in this mode later, click the Edit Mode button (or press Ctrl + Shift + M) on the standard toolbar.