Well, I think this code *does* display Word documents as well. However, the output will look crappy because a Word document contains a lot of bloat necessary for Word. It will also display the binary version of the document, not a textual representation of the text inside that document.
If you need to display Word documents in-line in your site, you can display them using an iframe. Simply set the src attribute of the <iframe> to the word document, like this:
<iframe src="YourDocument.doc" width="300px" height="300px" />
Depending on the browser's setup, users may be presented with a dialog asking them if they want to download and save the Word document.
Alternatively, you could do some Word Automation. I think you could create an instance of a Word Application server side, load the document and ask for its text. I don't have much experience in this subject, so you may be better off asking this in another forum.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to:
Song For Junior by
Beastie Boys (Track 14 from the album:
Hello Nasty)
What's This?