Run VBScript Action(Power Automate Desktop)


Japanese version.

An action that executes an arbitrary VBScript.

This is useful for using existing VBScript assets or for performing processing that is difficult to perform with actions alone.

However, it requires the input of the program code itself.

Therefore, it is recommended to use VBScript only minimally in an environment used by non-system engineers.

However, complex conditional expressions are too large to be processed by Actions, so it may be more convenient to use code.

How to use

Drag "Run VBScript" from "Scripting" under "Actions".

Set parameters.


VBScript to run

Specifies the VBScript code to execute.

Power Automate Desktop variables are available in this (enclose the variable name with %).

And the result in WScript.StdOut.Write.

The basic form is to receive the results in VBScriptOutput of Variables produced.

Script to run.
Dialog displayed on the first line.
Variables produced as a result.

Variables produced

The result of the execution of the "VBScript to be executed" is set.


The results of VBScript execution and standard output are stored.

Specifying the code as follows will set the standard output.


This can be used to return calculation results to flow.

Code example.
Execution result of the code example.


VBScript error output (WScript.StdErr.Write), runtime errors and syntax errors are set.

Execution result of the code example.

In addition to the specified contents, runtime and syntax errors will be added.

For those who want to learn Power Automate Desktop effectively

The information on this site is now available in an easy-to-read e-book format.

Or Kindle Unlimited (unlimited reading).

You willl discover how to about basic operations.

By the end of this book, you will be equipped with the knowledge you need to use Power Automate Desktop to streamline your workflow.

Table of Contents.

Update History.


Scripting Actions

Examples of Use

Excel cell format.

How to convert Excel and PDF file to each other.