Create and manage text variables

Last updated on Jun 2, 2026

Learn how to use variables in Adobe InDesign to automatically insert dynamic content, such as dates, file names, and page numbers, into your documents.

Before you begin

Close all documents if you want text variables to be available in every new document. Otherwise, text variables apply only to the current document.

Define a new text variable

The text variable options vary by variable type. For example, a chapter number variable lets you add text and choose a numbering style, while a running header variable lets you select a style and control punctuation and case. Text variables don’t break across lines. Adding too much text may cause overset text in narrow frames.

Select Type > Text Variables > Define.

Select New in the Text Variables dialog box.

Enter a name. For example, Full Chapter or Running Title.

Select a variable type from the Type drop-down menu.

Set options for the selected variable type.

Select OK, then select Done.

Insert a variable

Place the insertion point where you want the variable.

Select Type > Text Variables > Insert Variable, then select the variable. The variable appears in the document as text (for example, a date or file name).

To display a box around the variable using the current layer color, select Type > Show Hidden Characters.

Add text before or after a variable

Select Type > Text Variables > Define.

Select the variable, then select Edit.

Enter text in the Text Before and Text After fields.

Select the triangle icon to insert special characters.

Select OK, then select Done. The variable updates with the added text.

Edit an existing text variable

Select Type > Text Variables > Define.

Choose the variable, then select Edit.

Modify the variable name, type, or formatting options as needed.

Select OK, then select Done.

Delete text variables

Choose Type > Text Variables > Define.

Select the variable, then select Delete.

Select Done.

Import variables from another document

Select Type > Text Variables > Define.

Select Load, then double-click the document with the variables.

Choose the variables to import.

For naming conflicts, choose Use Incoming Definition to replace existing variables or Auto-Rename to rename the loaded variable.

Select OK, then select Done.

You can also copy variables to other documents when you synchronize a book file.

Tip

Variables appear alphabetically. Rename them with prefixes (such as numbers or categories) to control their order.