Formatting Issues

How to Place Word TOC Subheadings on the Same Line

Adam DavisAdam Davis Oct 19, 2026 868 views

Question details

The user wants to format a Table of Contents (TOC) in a document so that multiple subheadings and their corresponding page numbers appear together on a single line.

How to Place Word TOC Subheadings on the Same Line
Product
Microsoft Word
Device & OS
not provided
Scenario
Customizing the layout of an automatically generated Table of Contents to save space or achieve a specific document style.
Observed behavior
The word processor automatically places each heading and subheading on a new line by default, and there is no built-in setting to group sub-entries on the same line with comma separators.
Before you start

Ensure you have completely finished writing and editing your document before adjusting the Table of Contents, as any automatic TOC updates will overwrite your manual layout adjustments.

Solution 1Recommended

Manually Format and Lock the Table of Contents

Since there is no built-in automatic setting, you can manually arrange the subheadings on the same line and then lock the TOC field to prevent it from reverting when the document updates.

Word fields automatically regenerate based on the document headings. Locking the TOC field ensures that your custom spacing and formatting adjustments remain intact even if the document is saved or printed.

1
Generate the Table of Contents

Insert your Table of Contents normally by navigating to References > Table of Contents.

2
Adjust the Layout

Manually delete the paragraph breaks between the subheadings you want to combine. You can separate them using commas, semicolons, or spaces according to your preference.

3
Select the TOC

Highlight the entire Table of Contents by clicking and dragging over the text, or by clicking the TOC container tab.

4
Lock the Field

Press Ctrl + F11 on your keyboard to lock the TOC. This prevents automatic updates from erasing your manual formatting.

Manually Format and Lock the Table of Contents
Formatting Saved: Locking the field successfully stops Word from overwriting your custom subheading alignment.
Free Microsoft Office alternative

Format Documents Effortlessly with WPS Office

While standard word processors often require complex workarounds to customize Table of Contents layouts, WPS Office provides a highly compatible, free, and intuitive alternative for all your document formatting needs. Enjoy a familiar interface and seamless migration without the heavy subscription fees.

  1. 1. Download and Install: Get WPS Office for free from the official website and install it on your device.
  2. 2. Open Your Document: Launch WPS Writer and open your existing Word document directly without format loss.
  3. 3. Edit Seamlessly: Use the familiar References tab to generate, modify, and manage your Table of Contents.
Fully compatible with Microsoft Word DOCX and DOC formats.Advanced paragraph, styling, and Table of Contents formatting tools.Free and lightweight, running smoothly on Windows, Mac, and Linux.Familiar user interface requiring zero learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

How do I unlock a Table of Contents if I need to update it?

To unlock a previously locked Table of Contents, select the TOC field and press Ctrl + Shift + F11. You can then update the field, but note that any manual line breaks you removed will be regenerated to default.

Can I use a VBA macro to fix the TOC formatting automatically?

Yes, a VBA macro can automate the process of finding specific heading levels in the TOC and moving them to the same line. However, you will still need to run the macro every time you update the TOC, as updating it will restore the default line breaks.

Why does updating the TOC remove my custom text and formatting?

The Table of Contents is an automated field block. When you choose to update the entire table, the word processor completely deletes the existing field and rebuilds it from scratch based on the current headings in your document, wiping out manual edits.