Extracting text from Word Documents via PHP and COM
URL: http://www.developertutorials.com/blog/php/extracting-text-from-word-documents-via-php-and-com-81/
Requires an insecure, I mean Windows server (doh!)
Copy this code and paste it in your HTML
$word = new COM
("word.application") or
die ("Could not initialise MS Word object.");
$word->Documents->Open(realpath("Sample.doc"));
// Extract content.
$content = (string) $word->ActiveDocument->Content;
$word->ActiveDocument->Close(false);
$word->Quit();
$word = null;
Report this snippet