When I run this code in PHP, it works for the first time, but when I
try reloading it again, Apache complains of access violation errors.
Got any ideas?
<?php
// starting word
$word = new COM("word.appli cation") or die("Unable to instantiate
Word");
echo "Loaded Word, version {$word->Version}\n";
//bring it to front
$word->Visible = 1;
//open an empty document
$word->Documents->Add();
//closing word
$word->Quit();
//free the object
$word = null;
?>
try reloading it again, Apache complains of access violation errors.
Got any ideas?
<?php
// starting word
$word = new COM("word.appli cation") or die("Unable to instantiate
Word");
echo "Loaded Word, version {$word->Version}\n";
//bring it to front
$word->Visible = 1;
//open an empty document
$word->Documents->Add();
//closing word
$word->Quit();
//free the object
$word = null;
?>
Comment