Extend Word Javascript api to close the editing window
In a workflow scenario (not sharepoint workflow, something custom) where we want to have a button in a Word Add-In taskpane to close the Word Online window after saving the file. In this button we initiate a next workflow step by saving the document, initiate the next step by e.g. setting a flag in sharepoint and closing the document editing session of the user.
This could either be an office general api or a word specific api (this is where we need it the most).

Hi Ernst, thank you for your input! We’ve added this to our backlog as something we want to implement. There are many items on the backlog, so we can’t set an exact estimated time for this, but we’ll keep you posted with status updates.
Thanks!
Office Extensibility Team
4 comments
-
René Fedderholdt commented
We for sure need a way to close document (Word, Excel and PowerPoint), so if this could be up-prioritized it would be nice. We, and I guess, many other developers/companies could definitely use such a method.
-
Saravana Kumar Narayanan commented
in our office add-in we are updating the metadata of the editing document and we would like to close the document programmatically, currently it is not possible. kindly provide this option.
-
Matt Coggin commented
At Medtronic we are working on a Word Add-in that creates a new document with context.application.createDocument(myBase64). This opens a new window and we have no way to close the original empty document. The user has to manually close it.
-
Ernst Scheithauer commented
Hi Office Team,
great to hear that, I have some more info on this topic. The WOPI API has the possibility to declare the close url that would be navigated after the user closes the document.However, this url can only be defined by a custom wopi server, but cannot be defined by an application when using SharePoint.
As an application I want to define the url that is opened after closing the document using this api.
Can you please connsider this in your review?
Thanks, Ernst