title: Status failed: While getting the whole doc in Word Online
body: <p>In my scenario, I have to get the document from Word and send it to a server via a Word Add-In. </p>
  
  <p>I added all the function which are given in the Office.js Documentation: <a href="https://dev.office.com/docs/add-ins/develop/get-the-whole-document-from-an-add-in-for-powerpoint-or-word" rel="nofollow noreferrer">Get the whole document from an add-in for PowerPoint or Word</a>.</p>
  
  <p>The <code>result.status</code> returned from the following code however is <code>Failed</code>. There no error shown in the console so I'm not able to see a reason why.</p>
  
  <pre class="lang-js prettyprint-override"><code>sendDocument() {
      let self = this;
      window.Office.context.document.getFileAsync("compressed", {
          sliceSize: 100000
      }, function (result) {
          if (result.status === window.Office.AsyncResultStatus.Succeeded) {
              let document = result.value;
              let documentState = {
                  file: document,
                  counter: 0,
                  sliceCount: document.sliceCount
              };
              self.updateStatus("Getting document ", document.size + " bytes");
              self.getSlice(documentState);
          } else {
              self.updateStatus(result.status);
          }
      });
  };
  </code></pre>