Run macro
Open a macro-enabled presentation, run a VBA macro with up to 5 text arguments, return its result and optionally save. A macro that stops with an error is reported straight away with its message.
Command in the PowerPoint desktop toolkit · id ooa.powerpoint_desktop/run_macro · 7 inputs (2 required), 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Path | File | Yes | Presentation with macros (.pptm, .ppsm, .ppt). | |
| Macro | String | Yes | Macro name, optionally with its module. | |
| Arguments | List | No | Up to 5 arguments, passed to the macro as text. | |
| Save | Boolean | No | false | Save the presentation in place afterwards (when save_as is empty). |
| Save as | File | No | Save to this file instead of the opened one. | |
| Overwrite | Boolean | No | true | Replace save_as when it exists; false stops with POWERPOINT_DESKTOP.EXISTS. |
| Timeout (seconds) | Number | No | 600 | Maximum run time. |
Outputs
| Output | Type | What it is |
|---|---|---|
| result | String | Value the macro returned (for a Function), as text; empty for a Sub. |