Saravanan Posted July 18, 2007 Share Posted July 18, 2007 Hi, How to convert MS Word 2003 file to HTML using php script? very urgent. Thanks Quote Link to comment Share on other sites More sharing options...
Asday Posted July 18, 2007 Share Posted July 18, 2007 You might just want to go into werd itself, and save it as an .htm. You can tidy up the html at a later date. Why's it urgent? Quote Link to comment Share on other sites More sharing options...
DeadEvil Posted July 18, 2007 Share Posted July 18, 2007 hey, try this this one <? $phpFile = "myfile.php" $fileContent = file_get_contents("Word File"); $open_phpfile = fopen($phpFile , 'w+'); $write_phpfile = fwrite($open_phpfile, $fileContent); $phpFile = @chmod($phpFile, 0777); ?> Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted July 18, 2007 Share Posted July 18, 2007 from what I gather working with word is a bit of a pig. Apparantly using COm will allow you to edit the word doc but I think you will have to do some testing on echoing out the contents of the word doc so you can see all the code behind it and identify where you will substitute your html. Would be intersting to see if you can use the COM to save it as a html doc and see how workingon that goes too. Couple of links - not sure how useful they will be to you. http://www.zend.com/forums/index.php?t=msg&goto=8980&S=40a660bd5c30c487697e7ad411b1c0c3#msg_8980 http://www.whenpenguinsattack.com/2007/07/02/how-to-create-microsoft-office-documents-with-php/ Quote Link to comment Share on other sites More sharing options...
DeadManWalking Posted July 18, 2007 Share Posted July 18, 2007 If you have newer versions of Dreamweaver, first save your word document as html file (In Word, go to File>Save as Web page>Select HTML as extension), and than take your file into Dreamweaver and select Commands>Clean up Word HTML Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.