I need to create table - of-contents after mailmerge by macro as word does not support updating TOC field from TC fields.
Is it possible to automate creating TOC ?
I need to create table - of-contents after mailmerge by macro as word does not support updating TOC field from TC fields.
Is it possible to automate creating TOC ?
This will create a TOC using VBA:
Set rangeWord = ActiveDocument.Range(Start:=0, End:=0)
ActiveDocument.TablesOfContents.Add rangeWord, _
UseFields:=True, _
UseHeadingStyles:=True, _
LowerHeadingLevel:=3, _
UpperHeadingLevel:=1