如何使用 com 对象创建 power point 文件 MS word 文件。请为此举一些例子。我尝试了一些东西。但我在我的系统中找不到文件
示例代码如下
$word = new COM("word.application") or die ("couldnt create an instance of word");
echo "loaded , word version{$word->version}";
$word->visible = 1;
$word->Documents->Add();
$word->Selection->TypeText("this is some sample text in the document");
$word->Documents[1]->SaveAs("sampleword.doc");
$word->Quit();
$word->Release();
$word = null;