Change custom text variables

The script displays all custom text variables* defined in the active document and shows their contents. It can also be used to change the contents of any text variable. I use it in master documents for journals to change variables for volume and issue numbers, publication dates, etc.

* Because of a ScriptUI limitation, usually between 30 and 35 variables are shown. The exact number is determined by the size of your screen and probably the vertical screen resolution.


The script displays the dialog shown in the screenshot. The names of the text variables defined in the document are shown in the first column as field labels, their contents, in the fields.

The variables are shown in alphabetical order (which is how InDesign stores variables). To display any variables at the top of the window – e.g. group at the top those variables you change most often – you can prefix variable names with an underscore character.

If a variable name contains title (case-insensitively), its content is used for the dialog's title.


To change the contents of any variables, enter the new values in the text fields. When you're done, press OK.

Version history

19 Aug. 2017: Added a note that the number of variables displayed is determined by the screen size and probably the vertical screen resolution, and is usually between 30 and 35.

14 Nov. 2015: The script's pre-CC interface couldn't cope with the changes in CC, so I rewrote the interface. The script now works in all versions of InDesign.

11 Feb. 2012: The fields are now in a scrollable panel, which is needed when a document contains more than 20 custom text variables.

17 July 2010: Fixed a problem with the display of long variable names.

Useful script? Saved you lots of time?

Consider making a donation. To make a donation, please press the button below. This is Paypal's payment system; you don't need a Paypal account to use it: you can use several types/brands of credit and debit card.

Peter Kahrel's paypal account

Right-click, Save Link/Target As to download)

Back to the main script page

Installing and running scripts