JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,009 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 place a large jpg image (size 17.15 MB) in Word Online. The code appears that the image was placed successfully, but it doesn't place the image in the document and there are no error messages. It is working properly in Word Desktop.
let options = {coercionType: Office.CoercionType.Image};
Office.context.document.setSelectedDataAsync(base64, options, function(obj){
console.log('obj', obj)
context.sync().then(function(){
console.log('complete')
}, function(err){
if(err){console.log('failed')}
});
});
obj is returning:
status: "succeeded"
value: {}
The code places properly for a smaller image and on Desktop. Is there another way to check if the image placed properly or an error message?