You want to insert a table of contents in Word with a single keyboard shortcut instead of navigating through the Ribbon menu each time. Word does not include a built-in shortcut to auto-generate a TOC, but you can create one using the Quick Access Toolbar or custom keyboard shortcuts. This article shows you two methods to assign a shortcut that inserts a TOC instantly. You will also learn how to avoid common problems like missing heading styles or broken TOC fields.
Key Takeaways: Two Ways to Auto-Generate a TOC With a Shortcut
- Quick Access Toolbar method: Add the Insert Table of Contents command to the QAT, then press Alt + number key to run it.
- Custom keyboard shortcut method: Assign a key combination such as Alt + T or Ctrl + Shift + T to the InsertTableOfContents command in Word options.
- Heading styles prerequisite: The TOC shortcut only works if your document uses built-in heading styles Heading 1, Heading 2, and Heading 3.
How Word Generates a Table of Contents and What You Need First
Word builds a table of contents by scanning the document for paragraphs formatted with built-in heading styles: Heading 1, Heading 2, and Heading 3. The TOC field collects those headings and displays them as a linked list with page numbers. If your document uses custom styles or no heading styles at all, the TOC command will show an empty table. Before setting a shortcut, verify that all section titles use the official Heading 1 through Heading 3 styles from the Home tab Styles gallery. The TOC shortcut you create does not change the document; it only runs the existing Insert Table of Contents dialog. You must already have heading styles applied for the shortcut to produce a useful TOC.
Method 1: Add the TOC Command to the Quick Access Toolbar
The Quick Access Toolbar sits at the very top of the Word window, above the Ribbon. You can add the Insert Table of Contents button there, then trigger it by pressing Alt followed by the number key that matches its position. This method works in any version of Word from 2013 through Microsoft 365.
- Open Word Options
Click the File tab, then select Options at the bottom of the left pane. The Word Options dialog opens. - Go to Quick Access Toolbar settings
In the Word Options dialog, click Quick Access Toolbar on the left side. The right pane shows two lists: Choose commands from and the current QAT list. - Switch to the All Commands list
Open the dropdown under Choose commands from and select All Commands. This shows every command Word has, not just the popular ones. - Locate Insert Table of Contents
Scroll down the alphabetical list until you see Insert Table of Contents. Select it, then click the Add button between the two lists. The command moves to the QAT list on the right. - Move the command to your preferred position
With Insert Table of Contents selected in the QAT list, click the up or down arrows on the right side to change its order. The position determines the Alt + number shortcut. For example, if it is the first button, you press Alt + 1. If it is the second, Alt + 2, and so on. - Click OK and test the shortcut
Click OK to close Word Options. Press Alt on your keyboard. Word displays small letters or numbers over each QAT button. Press the number that corresponds to the TOC button. The Insert Table of Contents dialog appears. Select your options and click OK.
Method 2: Create a Custom Keyboard Shortcut for the TOC Command
If you prefer a direct key combination such as Ctrl + Shift + T instead of the Alt + number pattern, use the Customize Keyboard dialog. This method assigns a shortcut globally to the InsertTableOfContents command.
- Open Word Options and go to Customize Ribbon
Click File > Options > Customize Ribbon. At the bottom of the dialog, next to Keyboard shortcuts, click the Customize button. The Customize Keyboard dialog opens. - Select the All Commands category
In the Categories list on the left, scroll down and select All Commands. The Commands list on the right updates to show every available command. - Find InsertTableOfContents
Scroll the Commands list until you see InsertTableOfContents. Select it. The dialog shows Current keys if any shortcut is already assigned. - Type your new shortcut
Click inside the Press new shortcut key box. Press the key combination you want, such as Alt + T or Ctrl + Shift + T. Word shows whether that combination is currently assigned to another command (it says Currently assigned to:). If it is free, you see [unassigned]. Choose a combination that is unassigned to avoid conflicts. - Assign the shortcut and close
Click the Assign button. The new shortcut appears in the Current keys list. Click Close, then click OK to close Word Options. Now pressing your custom key combination opens the Insert Table of Contents dialog.
Common Problems When the TOC Shortcut Does Not Work
“The TOC shortcut inserts nothing or shows an empty table”
The shortcut runs the TOC dialog, but if no headings are formatted with built-in styles, Word inserts an empty TOC field. Apply Heading 1, Heading 2, or Heading 3 from the Home tab Styles gallery to all titles. After applying the styles, press F9 to update the TOC field.
“The custom keyboard shortcut does not save after restarting Word”
Custom keyboard shortcuts are stored in the Normal.dotm template. If this template becomes corrupted or is replaced by an IT policy, your shortcuts reset. To protect your shortcuts, export them using the Keyboard organizer in the Customize Keyboard dialog. Click Organizer, then copy the Normal.dotm shortcuts to a backup template file.
“Alt + number opens the wrong button on the QAT”
The Alt + number shortcut corresponds to the position of the button in the QAT from left to right. If you add or remove other buttons later, the number changes. Reopen Word Options > Quick Access Toolbar and reorder the buttons so the TOC command stays at the position you expect.
“The TOC dialog closes but no table appears”
This happens when the document is in Draft view or Outline view. The TOC field is still inserted, but it shows as a field code like { TOC \o “1-3” }. Switch to Print Layout view by clicking the View tab and selecting Print Layout. The TOC renders correctly.
QAT Method vs Custom Keyboard Shortcut: Which One to Use
| Item | QAT Method | Custom Keyboard Shortcut |
|---|---|---|
| Setup steps | Add command to QAT list | Assign key in Customize Keyboard dialog |
| Shortcut pattern | Alt + number key (1 through 9) | Any combination (Alt + T, Ctrl + Shift + T) |
| Works in all Word versions | Yes, from Word 2010 onward | Yes, from Word 97 onward |
| Shortcut changes when QAT items are added or removed | Yes, the number shifts | No, the shortcut stays fixed |
| Can be assigned to multiple commands | One command per QAT position | One shortcut per command, conflicts shown |
| Ease of discovery | Press Alt to see overlay numbers | Must remember or print the shortcut list |
You can now insert a table of contents in Word using a keyboard shortcut you set yourself. Start by applying Heading 1 through Heading 3 styles to your document titles, then choose either the QAT method for visual button access or the custom shortcut method for a direct key combination. If you often work with long documents, also consider assigning a shortcut to Update Table (F9 is the default) to refresh the TOC after editing headings.