PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 27th, 2004, 10:07 PM
confirm045 confirm045 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 28 confirm045 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 1 m 54 sec
Reputation Power: 0
convert MS Word to HTML format

how can i convert a MS Word document to HTML format using either PHP,Java or PERL?? please help.

Reply With Quote
  #2  
Old January 1st, 2005, 11:32 PM
confirm045 confirm045 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 28 confirm045 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 1 m 54 sec
Reputation Power: 0
Found sumthing

I've found this script froma site but it didn't work for me. My php.exe got an error and gave me this msg:
"
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, you@your.address and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.



Apache/1.3.14 Server at localhost Port 80"

this is what i used...


my form looks like this:
<html>
<head>
<title>Upload</title>
</head>
<body>
<form action="convertor.php" method="get" name="form" target="_self" enctype="multipart/form-data">

<strong>Please select the file to be uploaded</strong> <p>
<input name="browse" type="file" size="45" maxlength="200">
<input name="Upload" type="submit" id="Upload" value="Upload">
</form>


</body>
</html>


and this is my convertor.php:

<?PHP

// starting word
$word = new COM("word.application") or die("Unable to instanciate Word");

// if you want see thw World interface the value must be '1' else '0'
$word->Visible = 1;

//doc file location
$word->Documents->Open("$form");


//html file location '8' mean HTML format
$word->Documents[1]->SaveAs("g:\\test_doc.html",8);

//closing word
$word->Quit();


//free the object from the memory
$word->Release();
$word = null;
?>



Please help...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > convert MS Word to HTML format


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT