How can I change the library default for the Mode Menu to Viewing in SPO browser views for Word and Excel docs?

Smith, Jerry 1 Reputation point
2021-08-03T20:19:19.467+00:00

When a Word or Excel doc is opened in SPO, the browser view defaults to Editing in the Mode Menu. This is causing new versions when users accidently make changes. How can I make it so that the docs open in Viewing mode in my document library?

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 51,871 Reputation points Microsoft External Staff
    2021-08-04T09:03:14.087+00:00

    @Smith, Jerry

    You could use following JSON codes in the "Name" 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')"  
       }  
    }  
    

    Result:
    120427-1.gif


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.