Click here to Skip to main content
14,878,179 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Can I Open Word Document In Browser Or Calling Ms Word Application Using Html 5 ..?

You cannot. Word documents are not part of W3 standard. You probably saw many sites doing that. They just interpret the files on server side and represent it content with HTML. You can do the same. You need to develop some mapping between HTML and Word documents relevant to your purpose. You can use Open XML SDK:[^].

By the way, Microsoft warns about using Office Interop in server settings:;EN-US;q257757#kb2[^],[^].

This way, you can support new XML-based Office formats (such as .DOCX, .XLSX), ECMA-376 standard:[^],[^].

This way, you can work without Office installed. Also, the documents are supported by 3rd-party software. Please see my past answers:
Convert Office-Documents to PDF without interop[^],
Need a rather unique WPF text editor control[^],
Hi how can i display word file in windows application using[^],
Read a word file without using Interop.word dll...Do not want to install word in IIS..[^].

This is another option:[^].

Joezer BH 6-Feb-14 4:43am
Very good answer.
Thank you very much.
Just embed Google Doc Viewer through an iframe and specify the DOC file you want to display. This is the code you should add:

<iframe src="" style="width:600px; height:500px;" frameborder="0"></iframe>

Then you just need to set up your own document file to the "url" query string param and that's it! You can display not just DOC but any other file supported by the viewer like pdf, xls, etc. in any browser!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900