Chinaunix首页 | 论坛 | 博客
  • 博客访问: 11910
  • 博文数量: 6
  • 博客积分: 410
  • 博客等级: 下士
  • 技术积分: 100
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-05 09:40
文章分类

全部博文(6)

文章存档

2010年(6)

我的朋友
最近访客

分类:

2010-03-19 14:23:51

$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("C:\comtest.doc");


// close the connection to the COM component
$word->Quit();
阅读(338) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~