Show/Set Custom Text Variables
Display the names and values of custom text variables in a document; change them easily and create new variables conveniently.
This script is part of the Type and Text collection. See the full collection here.ย
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.
Use
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.
Peter Kahrel Script Repository
Hosted as a community service, and with deep appreciation, by CreativePro.com
Scripts by Topic | Script Index
Basic Script Installation and Use
How to Modify or Configure These Scripts
Resources for Scripting and Publishing Automation
About This Repository
Contact Peter Kahrel
Note to users: You run scripts at your own risk: CreativePro and the author accept no liability for anything that may be caused by any of these scripts. Always take the necessary precautions. We encourage you to save backups and test scripts on copies of your documents.
This article was last modified on August 22, 2026
This article was first published on November 3, 2025
Commenting is easier and faster when you're logged in!
Recommended for you
Top 10 Things You Must Do Immediately After Installing InDesign
When you first install InDesign, don't just dive in! First, make these ten chang...
Using Presentation Mode in InDesign
Presentation mode is a terrific way to show a document to a boss or client. Lear...
Fonts For Creating Musical Layouts
Adam Haus surveys the landscape of fonts for musical typesetting.
