I'm working on Office 365 Word Add-in that opens a document.
When we open the document via context.application.createDocument(base64string).open()
, it launches a new window instead of opening the document in current browser tab (in case of web Add-in) or current instance of word (in case of windows Add-in).
Here is my use case:
Check if there is already an open document and ask the user to save or lose changes.
Have an API to close the current open document e.g.
context.document.close();
Open a new document via
context.application.createDocument(base64string).open()
, so that the document is opened in the current window instead of opening in a new instance of word.
Is there any workaround to achieve this?
Cross posted here.
Thanks.