Run Macro#
Runs the specified macro in a Word document. To run macros from a file, you must enable the "Trust access to the VBA project object model" option in Word.
| Link to Word | [Link] Link to the Word document processing process. The variable name in this property must match the variable name in the "Link to Word" property of the "Create Document" or "Open Document" blocks from the Word group that were previously used to create or open this document. |
| Link to Document | [Link] Link to the document. The variable name in this property must match the variable name in the "Link to Document" property of the "Create Document" or "Open Document" blocks from the Word group that were previously used to create or open this document. |
| Method Name | [Text] The name of the method/function to be executed. If the "Macro File" property is specified, this name must be present in the file. |
| Method Parameters | [Number/Text/List] Parameters that will be passed to the method upon execution. If a list is specified, each item in the list will be passed as a separate method parameter. |
| Macro File | [Text] Macro file. If the property is specified, this file will be loaded into the VBA environment before execution. The file extension must be ".bas". |
| Add Prefix [ref] | When this property is enabled, a prefix [ref] will be added to all arguments. This is necessary for running macros in some versions of Word. If the block does not throw an error related to "ref", do not disable this property. |
| Result | [Text] The result of the Function execution. |
| Error Handling Level | Select the error handling level. Possible values:
If "Default" is selected, the value from the "Start" block of this diagram will be used. |
| Message Level | Select the message level that the blocks will output during operation. Possible values:
If "Default" is selected, the value from the "Start" block of this diagram will be used. |
| Error Text | [Text] Returns detailed information about the error in case of incorrect execution of the block's work. |