I've developed an application in which the page contains links to Word documents in SharePoint Document Libraries. An Office Web Apps server is installed on the SharePoint farm, and opening Word documents within the browser (using Word Web App) by clicking one of my page's links works perfectly. I simply include "Web=1" in the link's query string and it works, and as I wish, it opens the document in a separate tab, leaving my application page intact in its own tab.
But if the user has Word and decides to use it, they'll first see the document in the browser, then select the "Edit In Word" menu option. Here's where it goes off the tracks. The Word client opens with the document - that part is fine, but then, the browser page that once showed just the document, now re-directs to the document's parent library AllItems.aspx page.
I never want my users seeing that library. I only want them to see the one document at a time they want to see and edit.
I understand that this may be a normal redirect, IF I was in that library in the first place, and wanted to go back there after I had pushed the editing task into the Word client. But that's not the case with me. I don't want any redirect at all. In fact, it would be best if the tab just closed at that point.
Is there a way to change the default behavior of the browser tab holding a Word Web App document, once you select the "Edit In Word" menu option?