Docs: the macro policy summary lists the file commands that do run

The policy summary said file commands never run in a macro, but File >
Properties runs, and exports and printing run: without a path they only
produce bytes, and with one they need the permission and approval. The
summary now names what is denied and what runs, and the paragraph is
wrapped to the file's line length.
This commit is contained in:
prxnvt
2026-10-22 02:26:32 -04:00
parent 06bbcb504a
commit f1a46a2b53
+10 -6
View File
@@ -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