do you have one level of sub directories, or do sub directories have sub directories?
i have not worked with TOCs, but it looks straight forward to do
Code:
set wrdapp = Createobject("word.application")
for fold = 1 to 34
set newsht = thisworkbook.sheets.add
newsht.name = "Testgroup" & fold
rw = 1
fname = dir("\\data\testgroup" & fold & "\*.docx)
do while len(fname) > 0
set doc = wrdapp.documents.open("\\data\testgroup" & fold & "\" & fname)
newsht.cells(rw, 1) = doc.name
' do stuff here to get TOC information from doc
rw = rw + 1
doc.close false
fname = dir
loop
next
i do not have any documents with toc information, so if you want help with that, you will have to post a sample document (saved as .doc) for me to work with