用javascript 调用word文档!
<HTML>
<script language=javascript>
var wrd=new ActiveXObject("Word.Application")
wrd.visible=true
alert("您的"+wrd.Application.Caption+"安装路径为:\n"+wrd.Application.Path+"\n版本号是:"+wrd.Application.version+"\n注册使用者是:"+wrd.Application.UserName)
wrd.Documents.Open("d:\exam.doc")
wrd.Selection.TypeText("This is some text.")
wrd.Application.Activate()
wrd.ActiveDocument.SaveAs("d:\exam111.doc")
wrd=null
</script>
</HTML>
<script language=javascript>
var wrd=new ActiveXObject("Word.Application")
wrd.visible=true
alert("您的"+wrd.Application.Caption+"安装路径为:\n"+wrd.Application.Path+"\n版本号是:"+wrd.Application.version+"\n注册使用者是:"+wrd.Application.UserName)
wrd.Documents.Open("d:\exam.doc")
wrd.Selection.TypeText("This is some text.")
wrd.Application.Activate()
wrd.ActiveDocument.SaveAs("d:\exam111.doc")
wrd=null
</script>
</HTML>
- 没有相关文章
- 没有评论