这里是一个php用com操作windows下word的过程
php代码
// create a reference to a new com component (word) $word = new com(word.application) or die(can't start word!); // print the version of word that's now in use echo loading word, v. {$word->version}
; // set the visibility of the application to 0 (false) // to open the application in the forefront, use 1 (true) $word->visible = 0; // create a new document in word $word->documents->add(); // add text to the new document $word->selection->typetext(testing 1-2-3...); //save the document in the windows temp directory $word->documents[1]->saveas(/windows/temp/comtest.doc); // close the connection to the com component $word->quit(); // print another message to the screen echo check for the file...; ?>