向word中写入内容
首先在word中设置书签如书签名为bookmarkjavascript中可以这样写
var word;
word = new ActiveXObject(WordApplication);
var range = wordRange;
wordVisible = true;
var path = filepath;
wordDocumentsOpen(path);
range = wordActiveDocumentBookmarks(bookmark)Range;
rangeInsertBefore(哈哈哈哈哈哈);
把word文件转成html文件
<script language=javascript>
function saveword(){
var oWordApp=new ActiveXObject(WordApplication);
var oDocument=oWordAppDocumentsOpen(C:\\dochtml\\xdoc);
oDocumentSaveAs(C:\\ )
oWordAppQuit();
}
</script>
</HEAD>
<BODY>
Click the save button to save the file C:\testdoc to C:\:
<input type=button onclick=saveword() value=save>
</BODY>
</HTML>