UiPath Activities

The UiPath Activities Guide

Execute Macro

UiPath.Excel.Activities.ExecuteMacro

Execute the macro within a workbook. The Workbook file needs to be a Macro-Enabled Workbook. Changes are immediately saved. Can only be used in the Excel Application Scope activity.

Properties

Input

  • MacroName - The name of the macro to be executed. Only String variables and strings are supported.

Note:

Strings must be placed between quotation marks.

  • Macro Parameters - Enables you to pass parameters when executing the macro. This field supports only IEnumerable<object> variables.

Common

  • DisplayName - The display name of the activity.
  • ContinueOnError - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.

Note:

If this activity is included in Try Catch and the value of the ContinueOnError property is True, no error is caught when the project is executed.

Misc

  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.

Output

  • Macro Output - The value returned by the execution of the macro, if any. This output is retrieved as Object variables.

Example of Using the Execute Macro Activity

To exemplify how to use this activity, we have built an automation project that initializes a macro, asks the user for its name and executes the macro.
 
 
Download example

Updated 11 months ago


Execute Macro


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.