http://community.csdn.net/Expert/topic/2781/2781762.xml?temp=.3456537

解决方案 »

  1.   

    // 启动 word
    $word = new COM("word.application") or die("Unable to instanciate Word");
    print "Loaded Word, version {$word->Version}\n";//将其置前
    $word->Visible = 1;//打开一个空文档
    $word->Documents->Add();//写些东西到word里面,并保存为test.doc
    $word->Selection->TypeText("This is a test...something to wirte in");
    $word->Documents[1]->SaveAs(getcwd().'\test.doc');//关闭 word
    $word->Quit();//释放对象
    $word->Release();
    $word = null;
      

  2.   

    楼上对头,word不用com不行哦execl还可以随便糊弄糊弄