title: Document Viewer (doc or docx ) from byte array in angular 4
body: <p>I have a requirement to view all the attachments submitted by the end user. I am able to view the pdf and image files but I am not able to view the files with doc or docx extension.
  This is what I have done.</p>
  
  <pre><code>let file = null;
    if (extension === 'pdf') {
      file = new Blob([new Uint8Array(byteFile)], { type: 'application/pdf' });
    } else if (extension === 'jpg' || extension === 'png') {
      file = new Blob([new Uint8Array(byteFile)], { type: 'image/png' });
    } else {
      file = new Blob([new Uint8Array(byteFile)], { type: 'application/msword' });
    }
    if (file !== null) {
      const fileURL = URL.createObjectURL(file);
      window.open(fileURL, fileName);
    }
  </code></pre>
  
  <p>The above code works fine for pdf and image files in chrome and firefox (doesnot work for IE ) .However for doc or docx it does not work in any browser.Can any one tell me what should I do</p>