Office Q&A: How to remove page numbers from a table of contents in a Word document – TechRepublic

Register for your free TechRepublic membership or if you are already a member, sign in using your preferred method below.
We recently updated our Terms and Conditions for TechRepublic Premium. By clicking continue, you agree to these updated terms.
Invalid email/username and password combination supplied.
An email has been sent to you with instructions on how to reset your password.
By registering, you agree to the Terms of Use and acknowledge the data practices outlined in the Privacy Policy.
You will also receive a complimentary subscription to TechRepublic’s News and Special Offers newsletter and the Top Story of the Day newsletter. You may unsubscribe from these newsletters at any time.
All fields are required. Username must be unique. Password must be a minimum of 6 characters and have any 3 of the 4 items: a number (0 through 9), a special character (such as !, $, #, %), an uppercase character (A through Z) or a lowercase (a through z) character (no spaces).
Office Q&A: How to remove page numbers from a table of contents in a Word document
Your email has been sent
You can use built-in options to build a simple table of contents, but quite often, you’ll need to change the underlying field code to get the results you want.
WWord’s table of contents (TOC) feature is powerful and flexible but getting the results you need isn’t always possible using its built-in options. Often, you must modify the underlying field code to get certain results. That’s what Giovanni ran into. He wants to remove page numbers from an annotation. Fortunately, the solution is simple, if you know how to modify the TOC’s underlying field code.
A field code is a set of instructions that you can modify—smart text, of a kind. The results aren’t literal text, but the field code displays text. You can customize a field code by adding switches. Often, a switch is the only way to make certain customizations. Switches are just more instructions.
I’m using Office 365 on a Windows 10 64-bit system, but this solution will work in older versions. However, it isn’t supported by the browser version, although you can update an existing TOC. You can work with any document or download the demonstration .docx and .doc files.
LEARN MORE: Office 365 Consumer pricing and features
Word offers two ways to insert a TOC:
Both offer options that allow you to customize all levels of your TOC. However, neither option lets you omit page numbers from a specific level. You can, however, remove all page numbering, which is something you probably won’t want to do often.
If you plan ahead, you may know that you want to omit page numbers and create the TOC accordingly–for the most part. For instance, the simple document shown in Figure A needs a TOC. We’ve already applied Heading 1 to the section text and Heading 4 to the annotation text. (Using built-in styles isn’t strictly necessary to create a TOC, but it’s the easiest way.) We don’t want page numbers displayed for annotations; currently, we have only two levels: Heading 1 and Heading 4.
Figure A
First, let’s use the Reference tab to insert a TOC and see if we can turn off page number:
Figure B
Figure C
Figure D
Figure E
Without page numbers, the TOC isn’t particularly useful. In fact, it’s not obvious that it is a TOC. Before you continue, delete the TOC by right-clicking anywhere inside the TOC to select it. Then, press Delete twice.
The References tab doesn’t allow you to remove page numbering from a specific level. Inserting the TOC field code will have similar results.
To insert the field code manually, do the following:
Figure F
The annotations are included this time because you added Heading 4 in the previous section. You can use both methods to create the TOC with or without page numbers. However, neither method lets you remove page numbers from a specific level–Heading 1 or Heading 4.
For better or worse, the built-in page numbering option is all-or-nothing. However, you can directly alter the field code to disable page numbering for specific levels. If field codes are new to you, don’t worry—you’ll catch on quickly.
Before we make any changes, let’s examine the field code itself. To do so, right-click anywhere inside the TOC and choose Toggle Field Codes. Figure G shows the resulting field code. The default code that we added earlier has little to distinguish itself. (If you insert the TOC using the References tab, the field code will display more information.)
Figure G
We’ll use the
switch to remove page numbers from the fourth level (the annotations) using the following format:
The switch is
and the first and last parameters identify the levels. In this case, we’ll use
4-4 because we’re omitting page numbers only from level 4. If you enter 1-4, you’d omit page numbers from levels 1 through 4. You must enter both boundaries–
4 won’t work.
To modify the field code, insert the cursor between TOC and and enter
4-4. Add a space character to separate the new switch from the format switch, as shown in Figure H.
Figure H
To display the results of the code, shown in Figure I. right-click the field code and choose Update field. As you can see, adding the
switch removes page numbers for level 4—the annotations.
Figure I
Sometimes the only way to get what you want when customizing a TOC is to alter the TOC’s underlying field code. There’s almost nothing you can’t accomplish with the right switch and some creative planning.
I answer readers’ questions when I can, but there’s no guarantee. Don’t send files unless requested; initial requests for help that arrive with attached files will be deleted unread. You can send screenshots of your data to help clarify your question. When contacting me, be as specific as possible. For example, “Please troubleshoot my workbook and fix what’s wrong” probably won’t get a response, but “Can you tell me why this formula isn’t returning the expected results?” might. Please mention the app and version that you’re using. I’m not reimbursed by TechRepublic for my time or expertise when helping readers, nor do I ask for a fee from readers I help. You can contact me at
Most likely, you’ll want the annotation text to have the same formatting as the rest of the text. To simplify this example, I skipped doing so. To learn how to do this, read Use a custom style to annotate a Word table of contents.
Be your company’s Microsoft insider by reading these Windows and Office tips, tricks, and cheat sheets.
Office Q&A: How to remove page numbers from a table of contents in a Word document
Your email has been sent
Your message has been sent
TechRepublic Premium content helps you solve your toughest IT issues and jump-start your career or next project.
Looking for the best payroll software for your small business? Check out our top picks for 2022 and read our in-depth analysis.
Next year, cybercriminals will be as busy as ever. Are IT departments ready?
Coursera offers a variety of training options for the growing data professional. Explore top data science courses from Coursera now.
Organize a number of different applicants using an ATS to cut down on the amount of unnecessary time spent finding the right candidate.
Whether you are a Microsoft Excel beginner or an advanced user, you’ll benefit from these step-by-step tutorials.
This policy provides guidelines for secure and effective cloud computing operations to ensure the integrity and privacy of company-owned information. From the policy: The list of advantages to cloud computing includes lowered operational costs, greater technological flexibility, and the ability to rapidly implement new systems or services. Gains in business continuity are an especially noteworthy …
For SMBs, hiring a service to handle payroll calculation, processing and documentation can save valuable time and resources. This comparison chart with sample information provides a framework for comparing potential services. More on choosing a service: Payroll services The are several basic payroll services that all vendors should offer regardless of cost or additional services …
Employees who work from home often use company-supplied systems and devices, which helps ensure that they have consistent, state-of-the-art equipment to do their work. However, organizations should provide usage guidelines, such as this policy, covering the responsibilities of IT staff and employees. From the policy: For an organization to properly implement this policy it is …
Virtualization platforms are available from a number of vendors, but it’s still critical to maintain your virtualization environment to avoid unnecessary resource consumption, out of-compliance systems or applications, data loss, security breaches and other negative outcomes. This policy defines responsibilities for both end users and the IT department to ensure that the virtualized resources are …


Leave a Comment