Vb Script Activity
The Vb Script activity enables the execution of custom VBScript code within a workflow application. This activity facilitates the automation of operations by integrating user-defined scripts directly into the process flow.
| Field | Description | Requirement |
|---|---|---|
| Script | The VBScript code to be executed. | Required |
| Result variable name | The name of the variable that will store the output or result of the script execution. | Optional |
Action Types & Examples
Execute Script
- Format: String
- Example Result:
Script execution completed successfully.
Implementation Examples
Field Setup - Script:
Set objXLApp = CreateObject("Excel.Application")
objXLApp.Visible = false
Set objXLWb = objXLApp.Workbooks.Open("C:\Robusta_Projectxxxxyz.xlsx")
Set oSheet = objXLWb.Worksheets("Summary")
oSheet.Visible = xlSheetHidden
objXLWb.save
objXLWb.close false
objXLApp.Quit
Set objXLWb = nothing
Set objXLApp = nothing
Result variable name: excelScriptOutput Execution Parameters
Technical Notes
The Vb Script activity executes scripts using the Windows Script Host (WSH). If the Windows Script Host version message is not desired in the result variable, the
cscript //NoLogocommand should be added to the first line of the VBScript code.