比如:
var wordApp = new ActiveXObject("Word.Application");
wordApp.Visible = false;
var wordDoc = wordApp.Documents.Add();
wordDoc.ActiveWindow.Selection.InsertFile("C:\1.doc", EMPTY_VARIENT, false);InsertFile的参数是
InsertFile(FileName, Range, ConfirmConversions, Link, Attachment)但是我现在要指定Range为省去参数,但ConfirmConversions必须False,此处的JavaScript中即EMPTY_VARIENT应该是多少?
wordDoc.ActiveWindow.Selection.InsertFile("C:\1.doc", null, false);
wordDoc.ActiveWindow.Selection.InsertFile("C:\1.doc", undefined, false);
wordDoc.ActiveWindow.Selection.InsertFile("C:\1.doc", new Obejct(), false);
都是不可行的