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

How to

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:
firstlast
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 susansalesharkins@gmail.com.
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.
Windows 11 gets an annual update on September 20 plus monthly extra features. In enterprises, IT can choose when to roll those out.
Edge AI offers opportunities for multiple applications. See what organizations are doing to incorporate it today and going forward.
This is a complete guide for Apple’s iPadOS. Find out more about iPadOS 16, supported devices, release dates and key features with our cheat sheet.
Discover data intelligence solutions for big data processing and automation. Read more to explore your options.
Whether you are a Microsoft Excel beginner or an advanced user, you’ll benefit from these step-by-step tutorials.
Recruiting a Scrum Master with the right combination of technical expertise and experience will require a comprehensive screening process. This hiring kit provides a customizable framework your business can use to find, recruit and ultimately hire the right person for the job. This hiring kit from TechRepublic Premium includes a job description, sample interview questions …
Knowing the terminology associated with Web 3.0 is going to be vital to every IT administrator, developer, network engineer, manager and decision maker in business. This quick glossary will introduce and explain concepts and terms vital to understanding Web 3.0 and the technology that drives and supports it.
While the perfect color palette or the most sublime button shading or myriad of other design features play an important role in any product’s success, user interface design is not enough. Customer engagement and retention requires a strategic plan that attempts to measure, quantify and ultimately create a complete satisfying user experience on both an …
IIoT software assists manufacturers and other industrial operations with configuring, managing and monitoring connected devices. A good IoT solution requires capabilities ranging from designing and delivering connected products to collecting and analyzing system data once in the field. Each IIoT use case has its own diverse set of requirements, but there are key capabilities and …

source

Leave a Reply

Your email address will not be published.