Hi there,
Having a small issue, I want to delete all TOCs found in ActiveDocument but whatever I do, the TOC container remains.
This will delete the heading of the TOC, if any... and delete all content in range (mostly TOC fields)
Code:
For Each toc In ActiveDocument.TablesOfContents
toc.Range.Previous(Unit:=wdParagraph).Delete
toc.Range.Delete
Next toc
What is the property of the TOC container, it is not a Content Control as this returns nothing
Code:
For Each cc In ActiveDocument.ContentControls
MsgBox cc.Type
Next cc
Thanks for your help