note 60305 rejected from class.com by mazzanet

From: Date: Tue, 03 Jan 2006 10:14:03 +0000
Subject: note 60305 rejected from class.com by mazzanet
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-101140@lists.php.net to get a copy of this message
Note Submitter: candy at teamrise dot com dot tw ---- i am call COM, my script <?php // starting word $word = new COM("Excel.application") or die("Unable to instanciate Word"); print "Loaded Word, version {$word->Version}n"; //bring it to front $word->Visible = 1; //open an empty document $word->Documents->Add(); //do some weird stuff $word->Selection->TypeText("This is a test..."); $word->Documents[1]->SaveAs("Useless test.doc"); //closing word $word->Quit(); //free the object $word->Release(); $word = null; ?> but test it. show Loaded Word, version 11.0n Fatal error: Uncaught exception 'com_exception' with message 'Error Q•s“ž¬ˆõB ' in D:\TRSMTP\www\word.php:20 Stack trace: #0 D:\TRSMTP\www\word.php(20): com->Release() #1 {main} thrown in D:\TRSMTP\www\word.php on line 20 why?

« previous php.notes (#101140) next »