View Single Post
 
Old 05-02-2018, 12:56 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,969
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

NevilleT
It doesn't take a big mod to change the TOC to only list Heading 4

Change the line that says
Set oRng = Selection.Fields.Add(Selection.Range, wdFieldTOC).Result

to
Set oRng = Selection.Fields.Add(Range:=Selection.Range, Text:="TOC \o 4-4").Result

I would also recommend you add a line at the end to lock the TOC field because you won't want it updating
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote