2021.1

Table Of Contents
Tip
Hover over the name of a script in the Scripts pane to highlight parts of the template that
are affected by the script.
Next, the script can modify the selected pieces of content, using values from the record that is
merged to the template at the time the script runs. It can, for example, hide, replace or add text
or change the style of those pieces of content. This is how scripts personalize documents.
Note
In a Print context, the scripts in the Scripts pane run once for each section and then once
for each Master Page (see "Master Pages" on page498).
Tip
Content added by a script isn't visible in Design mode, but is visible and can be
inspected in Preview mode.
Post Pagination Scripts
Post Pagination Scripts are run in a Print context after the content has been paginated.
Because they can search through the output of all Print sections, and modify Print sections (one
at a time), they may be used to create a Table Of Contents (TOC), as explained in the topic:
"Creating a Table Of Contents" on page921.
For more information see "Post Pagination Scripts" on page919.
Creating a new Standard Script
Writing a Standard Script starts with this procedure.
1. On the Scripts pane at the bottom left, click New. A new script appears in the list. Double-
click on it to open it.
Page 869