note 85328 modified in book.com by felipe
| From: | felipe@php.net | Date: | Thu, 28 Aug 2008 13:40:42 +0000 |
| Subject: | note 85328 modified in book.com by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-143934@lists.php.net to get a copy of this message | ||
Extracting text from Word Documents via PHP and COM
<?php
$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;
echo $content;
$word->ActiveDocument->Close(false);
$word->Quit();
$word = null;
unset($word);
?>
--was--
Extracting text from Word Documents via PHP and COM
$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;
echo $content;
$word->ActiveDocument->Close(false);
$word->Quit();
$word = null;
unset($word);
http://php.net/manual/en/book.com.php