JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,007 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to open an existing document from within a Word add-in. I tried:
var newDoc = context.application.createDocument(base64Image)
newDoc.open()
context.sync()
but I'm am getting an error: Uncaught (in promise) RichApi.Error: GeneralException
.
When I don't pass in an argument into createDocument(), it successfully opens a blank document.
I've placed the base64Image into the current document using insertFileFromBase64
and insertInlinePictureFromBase64
, so I know the base64Image file is supported.
Any other ideas?