JustinEzequiel
Programmer
Using MS Word 2007, I recorded a macro to insert a table of contents.
Resulting code below.
When running the macro on the same document I used to record the macro, I get
Run-time error '5941':
The requested member of the collection does not exist.
What template must I attach to get this to work?
Resulting code below.
Code:
ActiveDocument.AttachedTemplate.BuildingBlockEntries("Automatic Table 1"). _
Insert Where:=Selection.Range, RichText:=True
Run-time error '5941':
The requested member of the collection does not exist.
What template must I attach to get this to work?