Requirement: Open documents in the browser in SharePoint Online.
By default, most document types (e.g., Word, Excel, PowerPoint) are set to open in the client application (e.g., Microsoft Word) when you click on them in SharePoint Online. However, you can change this behavior and open documents in the browser instead. Here’s how:
The “Open Documents in Client Applications by Default” feature and the library settings “Opening Documents in the Browser” decide whether a document should be opened in the web browser or in a client application more here: How to Open Documents in Client Applications by Default in SharePoint Online?
What if you want to force open a document in the web browser? E.g., PPTX or DOCX in the web browser? Well, here is the trick: Just append “?web=1” to the file URL! Obtain the link to the file and add ?web=1 parameter to it so that the file opens in the Browser directly.
So, here, the direct link to open my document in the browser is: https://crescent.sharepoint.com/sites/Marketing/Documents/SharePoint-Training.pptx?web=1
You can also select the file, click on the “Open” dropdown, and select “Open in Browser” from the toolbar to open a document in the browser!
Note that some document types may not be supported for opening in the browser.