note 95263 deleted from class.com by danbrown

From: Date: Tue, 22 Dec 2009 19:08:47 +0000
Subject: note 95263 deleted from class.com by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164255@lists.php.net to get a copy of this message
Note Submitter: rohit ---- <?php // starting word $word = new COM("word.application") 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(); //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 = null; ?> ............this above code is working totally right, i have tried it on word-2000 and it worked pretty welll..... first u will c just d version no. of word....bt ur file will be b created in c:\windows\system32\config\useless.doc if u dnt find it there search system by filename"useless.doc"...

« previous php.notes (#164255) next »