IR Framework

ExternalVBScript Object

Object that stores data key, item pairs.

Remarks

An ExternalVBScript object allows creation and interaction with the operating system through user-defined Windows Scripting Host Visual Basic scripts.

The following code illustrates how to create an ExternalVBScript object:

//	Create the array to store the arguments.
var arr = new Array();
//	Enter the arguments in name-value pairs.
arr.push("Filter");
arr.push("Text Files|*.txt|Excel Files|*.xls|All Files|*.*");
arr.push("initdir");
arr.push("C:\\AAWork");

//	Create an ExternalVBScript object.
var o = new ActiveDocument.ExternalVBScript(g_strUserTempPath, "OpenFileDialog.vbs", strOFDlgVBS, arr, 60, true);

//	Write the script to a file.
o.WriteScript();

//	Run the script and get the results.
var sFile = o.RunScript();

//	Use the results.
var sContent = ReadTextFromFile(sFile);

//	Reset the properties of the ExternalVBScript 
//	object and delete its associated files.
o.Reset();


Methods

Reset Method | WriteScript Method | RunScript Method



Properties

Debug Property | Timeout Property | Script Property | Args Property | ArgString Property | Path Property | FileName Property



Requirements





See Also

ExternalVBScript Class