Hopefully this is my last reply on this thread. I discovered after opening
Word normally after a few dozen tests, that it tried to "recover" all those
"lost" documents. The following demo script has that fixed.


<?php

function spellcheck($string){
$word = new COM("word.application") or die("The spellcheck function requires
MS Word.");
$word->Visible = 0;
$word->Documents->Add();
$word->Selection->TypeText($string);
$word->ActiveDocument->CheckSpelling();
$word->Selection->WholeStory();
$corrected = $word->Selection->Text;
$word->ActiveDocument->Close(false);
$word->Quit(false);
$word->Release();
$word = null;
return $corrected;
}

if ($text) {

$checkedtext= spellcheck($text);

print($checkedtext);

} else {
?>
<form action="spellcheck.php" method="post">
 Enter Text<textarea name="text"></textarea>
 <input type="submit">
</form>

<?php

}

?>

J Wynia
phpgeek.com



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to