ActiveXObject object (Object/JScript)

A Windows and MSIE specific object that allows various document components to be embedded.

Availability:

JScript - 3.0
Internet Explorer - 4.0
JavaScript syntax:IEmyActiveX = ActiveXObject
IEmyActiveX = new ActiveXObject(anApplication)
Argument list:anApplicationReferences an external application
Collections:Depends on the object created by the constructor

This is an object for embedding other applications into web pages on the Windows platform. The example shows the creation of an object that is managed by the Word application.

This is also used to create Dictionary objects by using the Scripting application to create a new Dictionary object.

Warnings:

Example code:

   // An example that opens a Word document and writes

   // text into it.

   var myActiveX = new ActiveXObject("Word.Document");

   myActiveX.Application.Visible=true;

   myString="Some text to be written to the document";

   // now write the text to the Word document

   myActiveX.application.selection.typeText(myString);

See also:Dictionary object, OBJECT object