.execute_vbscript Macro

This macro is used to execute a VB script specified in a separate file.

.execute_vbscript (vbs-file [,script-parameter])

The following parameters are available:

Parameter

Description

vbs-file

VB script file path

Type: Simple template (escape sequences ignored)

script-parameter

[optional] Passed to the script through the ScriptInputParameters global property.

Type: Simple template

The output is the ScriptResult global property value.

Example:

.execute_vbscript(C:\samples\vbs\login.vbs, %username%)

Note: the active object of the current translation scope can be accessed through the ActiveSelection collection as ActiveSelection.Item(0).

For more information on ActiveSelection, see Global Properties.