Tushar Chutani
Tushar Chutani

Reputation: 1570

embedding MS-word documents in HTML?

I was curios to know wheather it was possible to embed MS-Office documets in html without using any third party application as shown here.

thanks

Upvotes: 1

Views: 9033

Answers (3)

Matthew Lock
Matthew Lock

Reputation: 13536

It's relying on Google Docs in an iframe to render the Word document into HTML, but it's possible to use this code in your webpage:

<iframe style="width: 900px; height: 900px;" src="http://docs.google.com/gview?url=urltoyourworddocument&embedded=true" height="240" width="320" frameborder="0"></iframe>

http://christopher.su/2012/embedding-documents-google-docs/

Upvotes: 0

Quentin
Quentin

Reputation: 944215

That particular example involves using a third party Flash application that is delivered to the browser.

You don't "need" something like that. Using an <object> element should allow you to embed arbitrary media in a document.

However, browsers do not support Microsoft Office data formats, so they would need a plug-in in order to support it. Microsoft Office tends to install one but you can't depend on users having it installed. (Plenty of people don't have Microsoft Office, I carefully rip out because I'd much rather that following a link to a Word document resulted in it opening in an application and not throwing a pile of toolbars into my browser, platforms where Office doesn't run (mobile in particular) are growing, etc).

If you want to deliver an Office document for reading over the WWW then you are best off converting it to HTML in order to do so.

Upvotes: 0

jfriend00
jfriend00

Reputation: 707956

No, it is not possible to embed MS-word documents without third party plug-ins. MS-Office formats are not web-standards and browsers do not natively understand them.

They can be rendered by using a browser plug-in that understands the MS-Office format, by converting the MS-Office documents to HTML or by converting the MS-Office documents to PDF and using the Adobe PDF plug-in to render them.

Upvotes: 0

Related Questions