Hello,
I have a piece of JavaScript code which need to use create an ActiveXObject of Word.Application. To run this piece of JavaScript code, I have to un-disable the web browser’s (IE) “Initialize and Script activex controls not marked as safe” setting. Is there a way to avoid changing web browser’s security setting to run the following code?
var msw = new ActiveXObject(“Word.Application”);
var md = msw.Documents.Add(strMyFirstFile);
msw.Visible = True;
wd.Compare(strMySecondFile);//opens one doc w/ MS Word 97, but two docs with MS 2000/2003
I am using this piece of code to compare two MS Word Documents. Beside changing web browser’s security setting, another interesting thing is: If I run this code with MS Word 97, the wd.Compare(strMySecondFile) will open one MS Word document (the compare doc), but if I run the same code with MS Word 2000 or 2003, it will open two MS Word documents (the compare doc, plus separate window opening strMyFirstFile). How can we make the wd.Compare(strMySecondFile) ALWAYS open the compare doc?
Thanks for your help!