Modern SharePoint File Viewer URL

Bronze Contributor


Is there a way to open a file in the modern library File Viewers from a html link on a page?


Or will these file viewers only ever work from a link in a modern document library? they seems to just overlay the view in the current page. There must be a handler on the page to call the file viewer, as the url doesn't seem special.



1 Reply
best response confirmed by Warwick Ward (Bronze Contributor)
Looks like I answered my own question, you can just build the link using


The X button on screen will redirect to the parent in a new window, not the nice UX but at least it doesn't redirect the user back to the raw list view from a custom page.