word 宏,脚本编程

'脚本方式新建word 再新建文档,文档中输入字符串"你好"
Dim wdapp As Word.Application
Dim wddoc As Word.Document
 Set wdapp = CreateObject("Word.Application")
Set wddoc = wdapp.Documents.Open("d:\123.doc ")
  With wdapp
  .Visible = True
  .Activate
  .Selection.TypeText Text:="你好"
  End With

 

posted @ 2014-09-24 13:55  正月龙  阅读(1501)  评论(0编辑  收藏  举报
留言板