1
votes

I am developing an office web addin, and running in Word Online. I am trying to edit a document that I have created with context.application.createDocument. Here is the code:

   Word.run(function (context) {
        var myNewDoc = context.application.createDocument(base64);
        context.load(myNewDoc);
        return context.sync().then(function () {

            myNewDoc.body.insertText('Hello World!', 'Start');
            myNewDoc.open();
            return context.sync();

        });      
    });

I get this error at insertion of text / context.sync():

GeneralException The action isn’t supported in Word Online. Check the OfficeExtension.Error.debugInfo for more information. statement: var body=v.body;

Please help.

1

1 Answers

1
votes

This error is by design. On the newly created document, you can only call open methods. All others methods are not supported which means you can't operate the newly created document.