前提是需要在word模板中进行标记,此案例标记名称为 bookmark
var word;
word = new ActiveXObject("Word.Application");
var range = word.Range;
word.Visible = true;
var path = "D:/dhs/workspace_BZGL/bzsys/WebRoot/jsp/base/ncodevalue/newWord.doc";
word.Documents.Open(path);
range = word.ActiveDocument.Bookmarks("bookmark").Range;
range.InsertBefore("哈哈哈哈哈哈");