Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Erik Holleboom on September 25, 2015, 09:04:50 pm
-
Hi,
I try to instantiate an active X object like Word....
But I seem to get stuck on ActiveXObject is not defined?
I cannot find out what to do to make this possible. I see many examples doing it, but what needs to be enabled(option or simething alike) or present (tool)?
-
After changing from javascript script to jscript it worked.
Apparently there is some security difference
-
Its a syntax difference, not a security difference. There another syntax you need to use for JavaScript. Check the examples in the EAScriptLib MDG for examples in all three languages.
Geert
-
Instead of this (JScript):
var xmlDOM = new ActiveXObject("MSXML2.DOMDocument.6.0");
try this (JavaScript) instead:
var xmlDOM = new COMObject("MSXML2.DOMDocument.6.0");
That should work.