How to display MS Word document content in portlet?


I'd like to display MS Word document content in a portlet or portal page, is it possible to do so?  I'm currently using Oracle Portal 10g.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MS Word is a proprietary format, so it's better not to use it.
Only browsers that have a plugin installed will be able to display the file.
If you still want to do that, you can display the Word file inside and IFRAME and hope your visitors will be able to view it.
I have only tried that technique with PDF files, but i heard it also works with Word files (as long as you don't have html layers such as a popup menu that overlap your iframe).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

if it is only the content you are wishing to put on the web...

save the word files for the web (most modern versions of word have this option) - MS Word writes its web pages in XML - a very pliable format.

this can then be saved in a myriad of formats using Oracle - as you desire.

Hope this helps.

this can then be saved in a myriad of formats using Oracle - as you desire.
this can then be stored in a myriad of formats using Oracle - as you desire - a blob - binary - an xml blob etc etc - for total control.
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

The simplest thing to do would be to get a open source PDF converter and print your word document to PDF format before loading it to the web. You can also get web server based PDF converters which will perform on the fly conversion, however you will need to load a component on the web server, which may not be an option.
or you can save the word doc as html and publish that page, anyone should be able to view it.
in msword choose: file/save as/*.htm
As i said earlier if u save a Word document for the web it writes it in xml...

for example here is a xml from a word 2003 document saved as html with only one word in the document - blobby (notice what looks like inline xsl also - and no i dont know what filelist.xml is, it isn't there! :p ).

<html xmlns:o="urn:schemas-microsoft-com:office:office"

<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="blobby_files/filelist.xml">
<!--[if gte mso 9]><xml>
</xml><![endif]--><!--[if gte mso 9]><xml>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
      font-family:"Times New Roman";
      mso-fareast-font-family:"Times New Roman";}
@page Section1
      {size:595.3pt 841.9pt;
      margin:72.0pt 90.0pt 72.0pt 90.0pt;
<!--[if gte mso 10]>
 /* Style Definitions */
      {mso-style-name:"Table Normal";
      mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
      font-family:"Times New Roman";

<body lang=EN-GB style='tab-interval:36.0pt'>
<div class=Section1>
<p class=MsoNormal>blobby</p>
al9763Author Commented:

Thank you all for providing these great information.  But I have a lot of word documents which some of these documents are quite large in size so I figured it'd be better to view the document contents in portlet/page instead of downloading each documents to local hard disk or use browser to view it.  Is there a way to pass document content as a parameter and load it in portlet?
? so you haven't got a solution ?
>Is there a way to pass document content as a parameter and load it in portlet?

You could pass the document's name in a parameter and write a page to retrieve and display the contents but that would be pointless. Whatever you stream to the browser will get downloaded to the local browsers hard drive (cache).

To pass the content in a parameter would be fruitless due to browser restrictions on the size of parameters.

If you have a large number of documents to deal with, you can use a product such as omniformat to bulk reformat those documents to XML. PDF or HTML.
To clarify...

a portlet is generally a pluggable user interface component that provides a presentation layer (or in other words a GUI component that merely serves to present information)...
- it is not a magical device that allows somebody to view a webpage (and therefore the content within that webpage, whatever it may be) without having to download it first - 1st rule of the internet - to view it you must first download it. :)

If you would like to break up large document into smaller sections to facilitate easier viewing for the user kind of thing... then maybe you should read my earlier post :p

good luck
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.