How can I open and view a .doc file extension in my browser? The file is located on my server.
How can I open and view a .doc file extension in my browser? The
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Two options: First is to just link to it, e.g.
<a href="MyWordDocument.doc">My Word Document</a>, the second is to use an iframe and point it to the document. For this to work, however, most browsers require that the server sends aContent-disposition: inlineheader with the document. If you cannot configure your web server to do this, you can wrap the document in a bit of php:And then link to that script instead of your word document.
This isn’t guaranteed to work though; the content-disposition header is just a hint, and any browser may choose to treat it as an attachment anyway.
Also, note that .doc isn’t exactly portable; basically, you need Word to display it properly (Open Office and a few other Open Source applications do kind of a decent job, but they’re not quite there yet), and the browser must support opening Word as a plugin.
If the .doc file format requirement isn’t set in stone, PDF would be a better choice (the conversion is usually as simple as printing it on a PDF printer, say, CutePDF, from inside Word), or maybe you can even convert the document to HTML (mileage may vary though).