JavaScript API getAllContentAsync function is always undefined RRS feed

  • Question

  • I’m having a problem with the JavaScript API document.getAllContentAsync() function.

     I have the manifest permissions set to ReadWriteDocument in both the xml file and the form that comes up if you double click the manifest project xml file (in Solution Explorer).  The xml properties page has a dropdown, and that’s set like this:Manifest permissions

    The function to get all content is always undefined.  I can see it in the office.js source, so I am assuming it is a permissions thing.

    Here’s the code:

    function getAllDocument() {
        if (Office.context.document.getAllContentAsync) {
                function (result) {
                    if (result.status == "failed") {
                        logWrite(result.error.name + ": " + result.error.message);
                    else {
        else {
            logWrite("Permissions prevent accessing entire document");
    Thursday, August 30, 2012 11:00 PM


  • Hello Mark, please verify that your app is Word for this method to work.....

    In Excel is not avialable, and thats why it shows undefined.

    Friday, August 31, 2012 11:00 PM