View Single Post
Old 04-30-2018, 03:10 AM
slaycock slaycock is offline Windows 7 64bit Office 2016
Join Date: Sep 2013
Posts: 255
slaycock is on a distinguished road

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

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