i need to convert a MsWord document into an HTML file.
i cant do it, anybody know how???
(sorry for my bad english)
i need to convert a MsWord document into an HTML file.
i cant do it, anybody know how???
(sorry for my bad english)
From the word file menu, select save as and select html from the drop down.
hope it was so simple, i think i didn´t explain very well.
what i need is to display as html a .doc uploaded file.
so what i need is to convert it...!
I don't think there is an easy and direct way to just run a PHP script to convert Word documents to HTML, because .DOC is a proprietary format.
The best I can imagine is (if your server is running Windows) you might be able to take advantage of COM, and write a COM script to run Word on the server, to convert the .DOC to HTML. This would probably be very resource-intensive, also.
See http://www.php.net/manual/en/ref.com.php
I think there are also methods with MSSQL and OLE-DB (or something like that) to allow the database to interact with Word documents, which might allow some sort of conversion and display.
This is all going to be a lot of work, though. Why not just create a small macro in VBA for Word, and tell your users to download and run the macro, which will convert the current document to HTML, and prompt for upload. (Shouldn't be too hard, VBA can even create an FTP connection, and upload the document, if you want)
Microsoft has a command line tool available for free download. I believe it is called Office HTML Filter 2.0. I also believe the software only runs on the Windows platform, but I could be wrong. Hope this helps.
There is a program called wvWare, formerly known as mswordview. It runs under Linux and other UNIX os's and will take a word document and convert it to a html file.
mvwware.com is their website. You can then run a script which will run the shell command to convert the file. Good luck.
)