As far as I know there is no javascript library to do so. But there is a trick that is mentioned on stack overflow by using an iframe and the google doc viewer. See stackoverflow here: http://stackoverflow.com/questions/27957766/how-to-render-word-documentdoc-docx-in-browser-using-javascript
Would be nice if this could be incorporated somehow in the document viewer. So if it detects a word document use a popup with an iframe.
Regards,
Ronald