COM question
| From: | jlord2002@libero.it | Date: | Fri, 10 Jan 2003 20:44:53 +0000 |
| Subject: | COM question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-131186@lists.php.net to get a copy of this message | ||
How I can manage Word through PHP?
I have tried with the code indicated on PHP-guide (chm format) but it does not
work.
<?php
//test04.php
$word = new COM("word.application") or die("Non sono riuscito ad eseguire
Word");
$word->Visible = 1;
$word->Documents->Add();
$word->Selection->TypeText("Questa è una prova...");
$word->Documents[1]->SaveAs("Prova inutile.doc");
$word->Quit();
$word->Release();
$word = null;
?>
Warning: Invoke() failed: Eccezione. Source: Microsoft Word Description: Impossibile aprire la
memoria macro. in C:\PHP\ENZO\test04.php on line 7
Warning: Invoke() failed: Eccezione. Source: Microsoft Word Description: Il membro richiesto
dell'insieme non esiste. in C:\PHP\ENZO\test04.php on line 10