logo
search
Formatting Issues

How to Create a Custom Table of Contents with Subtitles and Page Numbers in Word

Camila MilosovichCamila Milosovich Sep 30, 2026 868 views

Question details

The user wants to generate a custom Table of Contents (TOC) with specific formatting, such as inline subtitles separated by commas and parenthetical page numbers.

How to Create a Custom Table of Contents with Subtitles and Page Numbers in Word
Product
Microsoft Word
Device & OS
not provided
Scenario
Preparing a uniquely formatted document or summary where the standard Table of Contents structure does not meet specific editorial or styling guidelines.
Observed behavior
Microsoft Word cannot automatically generate a Table of Contents with same-line subtitles separated by commas and page numbers enclosed in parentheses; it defaults to hierarchical, multi-line formatting without custom punctuation.
Before you start

Review your document to ensure all section titles and subtitles are finalized and marked with consistent Heading styles, as manual edits to a Table of Contents can be easily overwritten upon updating.

Solution 1Recommended

Use Standard Table of Contents Formatting with Heading Styles

The most reliable method is to use standard built-in TOC formatting by utilizing Heading 1 and Heading 2 styles, and applying minor manual adjustments at the final stage.

While Word cannot automatically insert commas and inline subtitles in its automated TOC, using standard heading styles ensures your page numbers remain accurate. You can make layout adjustments manually right before saving the final version.

1
Apply Heading Styles

Highlight your main headings and apply the 'Heading 1' style from the Home tab. Apply 'Heading 2' to any subtitles you want included.

2
Insert Custom Table of Contents

Navigate to the 'References' tab, click on 'Table of Contents', and select 'Custom Table of Contents' at the bottom of the dropdown menu.

3
Adjust TOC Settings

Ensure that the 'Show levels' setting includes your chosen heading levels. Uncheck 'Right align page numbers' if you want numbers closer to the text, then click 'OK' to insert the TOC.

4
Manually Format the Layout

Once generated, place your cursor at the beginning of a Heading 2 subtitle and press 'Backspace' to pull it onto the same line as the Heading 1 entry. Type a comma to separate them, and manually type parentheses around the page numbers.

Use Standard Table of Contents Formatting with Heading Styles
Important Note on Manual Edits: If you right-click the TOC and select 'Update entire table', Word will regenerate the list and erase your manual formatting. Always choose 'Update page numbers only' or save manual layout adjustments for the very end of your writing process.
Efficient Document Formatting

Easily Manage and Customize Table of Contents with WPS Writer

WPS Writer offers a highly intuitive and flexible Table of Contents generation tool. It perfectly supports all standard Word document formats and lets you efficiently modify styles, update page numbers, and manage complex document layouts.

  1. 1. Apply Standard Headings: Open your document in WPS Writer and apply standard Heading styles from the Home tab to your titles and subtitles.
  2. 2. Access the TOC Tool: Navigate to the 'References' tab on the top ribbon and click on the 'Table of Contents' button.
  3. 3. Insert and Customize: Select 'Insert Table of Contents' to customize the heading levels, tab leaders, and overall formats before clicking 'OK'.
  4. 4. Update Easily: To update page numbers or headings after editing your document, simply right-click the TOC and select 'Update Field'.
Fully compatible with Microsoft Word (.docx, .doc) heading styles and TOC fields.Advanced reference tools to easily insert, customize, and update a Table of Contents.Lightweight software with a familiar, user-friendly interface.Free to use with comprehensive professional document formatting capabilities.
QA img-9

Frequently Asked Questions

Can Microsoft Word automatically format subtitles on the same line in a Table of Contents?

No, Word's built-in Table of Contents feature automatically places different heading levels on separate lines. To achieve same-line subtitles, you must manually edit the generated TOC or use custom REF and PAGE fields.

How do I put page numbers in parentheses in the Table of Contents?

The automatic TOC generator does not support adding parentheses around page numbers out of the box. You will need to manually type parentheses around the page numbers in the generated TOC before printing or exporting, or build a manual summary list using PageRef fields.

Why does my customized Table of Contents revert to its original format when updated?

When you click 'Update entire table', the word processor regenerates the TOC based strictly on the assigned Heading styles, wiping out any manual typing or formatting (like adding commas or parentheses). To preserve manual edits as long as possible, only choose 'Update page numbers only'.

What are REF and PAGE fields used for?

REF and PAGE (or PageRef) fields are dynamic codes used to insert cross-references to bookmarks or specific headings. They allow you to manually construct highly customized lists and summaries that point to specific text or page numbers anywhere in your document.