Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 04-30-2018, 03:10 AM
slaycock slaycock is offline Table of Contents causes error when checking style Windows 7 64bit Table of Contents causes error when checking style Office 2016
Expert
 
Join Date: Sep 2013
Posts: 255
slaycock is on a distinguished road
Default

It may be that you don't need a macro at all. This is because Word allows you to build a Table of Contents using any style or set of styles that exist in your document. To do this you need to use the \t switch in the TOC field

https://support.office.com/en-us/art...rs=en-US&ad=US

For example, if you wanted to construct a TOC using the style 'myStyle1' and 'myStyle2' you would use the \t switch in the following way

{ toc \t "myStyle1,1,myStyle2,2" }

The number that follows the style tells word which TOC style to use when compiling the TOC. This in the above example the 'myStyle1' headings would appear in the TOC using 'TOC 1' style for 'myStyle1' and 'TOC 2' style for 'myStyle2' .
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Table of Contents causes error when checking style Table of contents vs headings: what style settings need to be changed? boxhamster Word 5 08-15-2015 03:25 PM
LaTeX style table of contents in MS Word MichaelHenrotte Word 1 11-23-2014 03:16 AM
Table of Contents causes error when checking style Creating Table of Contents From a Custom Style Jetheat Word 4 12-15-2013 03:54 PM
How to have this Heading – Table of contents style? Jamal NUMAN Word 0 01-13-2011 06:02 PM
Word 2003 Table of Contents Error Message ktcolburn Word 1 10-30-2005 06:14 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:01 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft