Good Day,
I've built a custom page in an O365 SharePoint tenant which directs users to Office Web Apps (OWA) when they click a document link in that custom page. For example:
When clicking the link above, a user is sent to
https://foo.sharepoint.com/sites/bar/_layouts/15/wopiframe.aspx?sourcedoc=[absolute_url_to_doc]&action=default
From the above OWA URL, the user is directed to the standard Microsoft Office OWA UI, and the control on that page I'm focused on is circled below. Let's call it the "return to site link"
When clicking that return to site link, the user is sent back to the document library which contains the document, and not the custom page from which the user activity originated (i.e. from where s/he clicked the link).
Having searched for a solution to allow me to control the target of the return to site link, I found two solutions that looked promising:
- Add a "source" GET parameter to the URL. OWA will use that parameter for its return to site link
- Specify the desired return to site link target/URL as the value for the WOPISessionContext document.cookie (e.g. document.cookie="WOPISessionContext=https://foo.sharepoint.com/sites/bar/pages/mycustompage.aspx"
However, neither of these options worked alone, nor when combined.
So to my question: is there any way to control the link value for the "return to site link" in the upper corner of the OWA UI?
Thanks in advance.
--
Chris