note 95263 added to class.com
| From: | rohit at osu1 dot php dot net | Date: | Tue, 22 Dec 2009 18:27:09 +0000 |
| Subject: | note 95263 added to class.com | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-164246@lists.php.net to get a copy of this message | ||
<?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"...
----
Server IP: 59.162.86.123
Probable Submitter: 121.246.214.198
----
Manual Page -- http://www.php.net/manual/en/class.com.php
Edit -- https://master.php.net/note/edit/95263
Del: integrated -- https://master.php.net/note/delete/95263/integrated
Del: useless -- https://master.php.net/note/delete/95263/useless
Del: bad code -- https://master.php.net/note/delete/95263/bad+code
Del: spam -- https://master.php.net/note/delete/95263/spam
Del: non-english -- https://master.php.net/note/delete/95263/non-english
Del: in docs -- https://master.php.net/note/delete/95263/in+docs
Del: other reasons-- https://master.php.net/note/delete/95263
Reject -- https://master.php.net/note/reject/95263
Search -- https://master.php.net/manage/user-notes.php