Hi,
I am building an application in PHP, wherein I am asking the user to upload a word document. Once he does that, I want to display that word doc in HTML format, how do i do that, without using 3rd party tools?
thanks
Conversion from Word to HTML
Moderator: General Moderators
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
Conversion from Word to HTML
I am trying to do that, but I get this error:
Warning: (null)(): Unable to lookup Documents: Error accessing the OLE registry. in c:\inetpub\wwwroot\StrAppWorks\testpages\WordToHTML\wth.php on line 4
the code that I am using:
feyd | Please review how to post code using
Warning: (null)(): Unable to lookup Documents: Error accessing the OLE registry. in c:\inetpub\wwwroot\StrAppWorks\testpages\WordToHTML\wth.php on line 4
the code that I am using:
Code: Select all
<?
$word = new COM("word.application") or die("Unable to instanciate Word");
$word->Visible = 1;
$word->Documents->Open("one.doc");
$word->Documents[1]->SaveAs("test_one.html",1);
$word->Quit();
$word->Release();
$word = null;
?>feyd | Please review how to post code using
Code: Select all
andCode: Select all
tags. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]