The Insert submenu offers a selection of different variable types that can be inserted into an article at any insertion point. Once the variable type is selected it becomes part of the article and can only be edited as a single character. For example, if you select the Page number variable and insert the page number on the masterpage and have View Masterpage Objects on, the page numbers appears automatically on all the pages based on that masterpage.

Holding down a Shift key while choosing a Page or Character variable will open a dialog box to override the number format for the document.

To insert a variable type: Select the Text tool from the toolbox and place the insertion point where there variable type will be inserted. Choose Insert from the Type menu and select the appropriate variable option. Depending on which option is selected a dialog box may appear to allow you to customize the variable type.

Insert Variable type Description
Page # Inserts the current page number.
Previous Frame Page # Inserts the page number of the previous linked framed. Use for Continued from page #.
Next Frame Page # Inserts the page number of the next linked frame. Use for Continued on page #.
Page Count Inserts the number of pages at the current document level. Use for Page # of #.
Chapter # Inserts the chapter number.
Chapter Count Inserts the number of chapters at the current document level. Use for Chapter # of #.
Document Name Inserts the name of the document.
Chapter Name Inserts the name of the current chapter.
Text Mark Inserts an invisible mark into the text. Text marks are special codes which can be searched for with script commands. Text marks are invisible unless Show Invisibles is toggled on.
Text Mark Name Opens a requester to select a text mark name to insert.
Text Mark Page # Opens a requester to select the text mark whose page number you want to insert.
Date Opens the Insert Date requester to specify the format of the date to insert.
Time Opens the Insert Time requester to specify the format of the time to insert.
Revision # Opens the Insert Revision number to specify the format of the revision number to insert.
Variable Text Opens a requestor to select a user-defined variable to insert. Use this to insert constants in your text that you may want to change in the future.

Date Variables

You can specify the date format to be used when the Insert Date variable is selected.

To customize a date variable: Choose Custom from the Insert Date submenu in the Type menu. Enter a date variable, refer to the table below for more information. You do not need to include all four parts of the date. Use a slash, hyphen, comma or space to separate them.

Note: One character following a backslash or text inside double ""quotation marks will appear as is. If the first letter of a format is capitalized (Mmm), that part of the date will be capitalized (if applicable). If at least the first two letters are capitalized (MMm), it will be uppercase. If the first two letters are lowercase, it will be lowercase.

Custom Date Syntax
y or yy The last 2 digits of the year. i.e., 94, 95, 96
yyyy All 4 digits of the year. i.e., 1994, 1995, 1996
yyyyy Long year. i.e., Nineteen Hundred Seventy Four
m Number of the month, no leading zero. i.e., 1, 6, 7, 10
mm Number of the month, leading zero. i.e., 01, 06, 07, 10
mmm 3 letter abbreviated month. i.e., jan, jun, jul
mmmm 3-4 letter abbreviated month. i.e., jan, june, july
mmmmm Full name of the month. i.e., january, june, july
d Number of the day, no leading zero. i.e., 1, 2, 12
dd Number of the day, leading zero. i.e., 01, 02, 12
dddd Ordinal number of the day. i.e., 1st, 2nd, 12th
w Number of the day of the week. i.e., 1, 2, 3, 4, 5, 6, 7
ww 1-2 letter abbreviated day of the week. i.e., su, m, tu, w, th, f
www 3 letter abbreviated day of the week. i.e., sun, mon, tue, wed
wwww Full day of the week. i.e., sunday, monday

Examples:
y-m-d 94-12-19
mm/dd/yy 12/19/94
d/mm/yyyy 19/12/1994
Mmm d, yyyy Dec 19, 1994
Wwww "the" dddd Monday the 19th

Time Variables

You can specify the time format to be used when the Insert Time variable is selected.

To customize a time variable: Choose Custom from the Insert Time submenu in the Type menu. Enter a time variable, refer to the table below for more information. You do not need to include all three parts of the time. Use a colon or space to separate them.

Note: One character following a backslash or text inside double ""quotation marks will appear as is.

Custom Time Syntax
h hour, no leading zero. i.e., 5
hh hour, leading zero. i.e., 05
m minutes, no leading zero. i.e., 8
mm minutes, leading zero. i.e., 08
s seconds, no leading zero. i.e., 3
s seconds, leading zero. i.e., 03
ampm shows am or pm as appropriate. i.e., 5 am
pm shows only pm when time>12:00. i.e., 7 pm no indicator specifies 24 hour time. i.e., 19

Examples:
h:m 5:15, 19:30
h:m ampm 5:15 am, 7:30 pm
h:m PM 5:15, 7:30 PM
hh:mm:ss 05:15:21, 19:30:46
hh\hmm 5h15, 19h30