diff --git a/docs/macros.md b/docs/macros.md index cf93148d3..dc0c044c7 100644 --- a/docs/macros.md +++ b/docs/macros.md @@ -75,12 +75,16 @@ called Output, even when a token or input has that name. `macro.run {name, inputs?, onConflict?, overwrite?, approve?, timeLimit?}`: -1. **Policy.** File, app, window (including New Window, Hide and Unhide), automate and macro - commands, and Undo and Redo, never run in a macro. Reading or writing a file (`data.getData`, `data.fromTextCsv`, `insert.picture` or - `pageLayout.background` with a `path`, or an export or print with a `path`) needs the command - in the macro's `permissions`. Any `path` other than `null` counts, including a blank one and a - token, and the policy is checked again on the parameters as they are when the step runs. A macro that touches files, or that came with a workbook opened - from a file, runs once the person approves it: the call fails with `approve: …` and runs with +1. **Policy.** File commands other than Properties, exports and printing (such as Open, Save + and Close), app, window (including New Window, Hide and Unhide), automate and macro commands, + and Undo and Redo, never run in a macro. File › Properties runs, and so do exports and + printing (`file.exportPdf`, `exportCsv`, `exportHtml`, `print`, `printPreview`, `saveBytes`) + that only produce bytes. Reading or writing a file (`data.getData`, `data.fromTextCsv`, + `insert.picture` or `pageLayout.background` with a `path`, or an export or print with a + `path`) needs the command in the macro's `permissions`. Any `path` other than `null` counts, + including a blank one and a token, and the policy is checked again on the parameters as they + are when the step runs. A macro that touches files, or that came with a workbook opened from + a file, runs once the person approves it: the call fails with `approve: …` and runs with `approve: true`. Approval lasts for the session, until the macro changes. 2. **Footprint.** The macro first runs in dry-run mode on the real workbook, and everything is put back. Cells it would write outside its inputs that hold data, and sheets and objects it would