Programmer's Guide > Using the AOM > Using COM to Access the AOM > Accessing COM Using JScript or VBScript
  
Accessing COM Using JScript or VBScript
You can access the AOM in JScript and VBScript using the COM interface. The Arbortext EditorApplication and Acl objects are exposed to the script automatically as global objects when using the built-in script interpreters.
You can access external third-party COM objects using the JScript ActiveXObject object or the VBScript CreateObject and GetObject functions. Microsoft Excel is an example of a COM server which can be accessed from Arbortext Editor. For example, to launch Microsoft Excel using JScript, use the following statement:
var xl = new ActiveXObject("Excel.Application");
To launch it using VBScript, use:
Dim xl
set xl = CreateObject("Excel.Application")
Both examples provide access to Excel's Application object, which is different from the Arbortext EditorApplication object. (If you were running a script outside the built-in interpreter, for example, using Excel VBA, you would need to create an instance of the Arbortext EditorApplication object using Epic.Application.)
Extensive documentation on JScript and VBScript is available from the Microsoft Developers Network (MSDN) web site at msdn.microsoft.com. Search for the topic “Windows Script”. Documentation on how to use a COM server, such as Excel, is provided by the software vendor. In the case of Microsoft Office products, the VBA (Visual Basic for Applications) documentation is the primary source of information on the COM objects exposed in each Microsoft Office application.