Open a document in View mode by default- SharePoint

Anonymous
2022-01-04T23:20:48+00:00

Is there a way to open Word, Excel, or Powerpoint documents in 'Viewing' mode by default? When I open a document it opens by default in 'Edit' mode. Opening in Edit mode does not accurately display file formatting and headers and footers are not visible.

Ideally, I'd like the document to open in "Viewing" by default to ensure formatting, headers and footers are displayed correctly.

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2022-01-05T00:53:48+00:00

    Hi TanyaSPG,

    Thanks for sharing updates with us and I really appreciate your effort and your precious time doing those tests. First, please accept my apologize you meet such an issue and I understand it effort on your daily work.

    We appreciate your understanding that sometimes the initial suggestions may not resolve the problem very soon. However, we can work together to narrow down and resolve the situation

    Regarding to, "If I was to use solution 4, is it possible to also have the ability to 'edit' the document?" if you wish to use Solution 4, and also want user the ability to Edit document as well, the you may use below JSON code in update your column (File column).

    {
       "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
       "elmType": "a",
       "txtContent": "@currentField",
       "attributes": {
          "target": "_blank",
          "href": "=if(indexOf([$ContentTypeId], '0x0120') >= 0, '?id=' + [$FileRef], @currentWeb + '/_layouts/15/Doc.aspx?sourcedoc='+ [$UniqueId] + '&action=View')"
       }
    }
    

    Note: When user click on stored document in SharePoint online document library, it will open in View mode however in the top of document bar have "Edit button" click on it when users want to edit document.

    Image

    I appreciate your understanding and stay safe!!

    Best Regards

    Waqas Muhammad

    17 people found this answer helpful.
    0 comments No comments
Answer accepted by question author
  1. Anonymous
    2022-01-05T00:17:26+00:00

    Hi TanyaSPG,

    As per your description, please don’t worry we can work together to narrow down and resolve the situation.

    Generally, when we click a Word, Excel or PowerPoint file in SharePoint online and OneDrive for Business or open a sharing link to a Word, Excel or PowerPoint file in your browser, we will open directly into edit mode, allowing you to jump into work faster than ever.

    Since you concern, open Office 365 file document “View only” mode by default instead of “Edit “mode.  In my opinion to meet your requirement, here are some solution for you(you can chose).

    Solution1:

    You can set “Require documents to be checked out before they can be edited“to Yes in Version settings in Library Settings. In this scenario when you and users will open the document (stored in SharePoint online document library) in View/read only mode. See image below for your reference:

    Result view:

    Solution2:

    Also, your needs could be achieved via SharePoint, give yourself read-only permissions. For example, in SharePoint Online, go to site setting> permission - create a new group (read only) - add yourself or other users to this group - after these steps, users will open the document (stored in SharePoint online document library) in read only mode.

    Solution3:

    If you can open the document at Desktop App (Word, Excel, etc) before uploading at SharePoint. Then you can set the document to open as Read-Only.

    Solution4:

    You can achieve setting the default to 'View" mode by using SharePoint Column Formatting.

    Simply update your column (File column) with the following json and your documents will now open in Preview instead of Edit:

    {"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json","elmType": "a","txtContent": "@currentField","attributes": {"target": "_blank","href": "=if(indexOf([$ContentTypeId], '0x0120') >= 0, '?id=' + [$FileRef], [$ServerRedirectedEmbedUrl])"}}

    Result preview view:

    I appreciate your understanding and stay safe!!

    Best regards

    Waqas Muhammad

    13 people found this answer helpful.
    0 comments No comments
Answer accepted by question author
  1. Anonymous
    2022-01-07T07:07:22+00:00

    Hi TanyaSPG,

    May I know have any updates regarding to this issue? Feel free to post back if you need further assistance.

    Best Regards,

    Waqas Muhammad

    6 people found this answer helpful.
    0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-01-05T00:37:56+00:00

    Hi Waqas,

    Thank you very much for your prompt reply. I have tested solution 4 and the document does open up in 'View' mode, however from this mode it is not possible to then revert back to the 'edit' option if the user wanted to edit the document. Using this JSON also appears to remove the option to edit the document via the document library.

    If I was to use solution 4, is it possible to also have the ability to 'edit' the document?

    Ultimately, I would like the document to open in 'View' mode to ensure formatting, headers and footers are displayed correctly. However I would also like to be able to edit the document from this view as required.

    4 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2022-01-09T22:07:54+00:00

    Hi Waqas,

    The updated JSON entry you provided worked and I was able to open the document in View mode and still have the ability to edit. Thank you very much for your prompt assistance to my query.

    Kind regards,

    Tanya

    3 people found this answer helpful.
    0 comments No comments