Hi

I have a folder called

\\data\

underneath it I have 30+ directories each containing 300+ word documents.

\\data\TestGroup01\
\\data\TestGroup02\
...
\\data\TestGroup31\

I need to place an excel spreadsheet in \\data\

It should contain a macro that loops through \\data\TestGroupXX\
For each directory it should
1) create a new worksheet.
2) Scan the directory for .doc files
3) For each .doc file it should scan the Table of Contents "TOC" data
4) For each TOC line it should write a line to the worksheet

Document Name ( eg Compound Analysis.doc)
TOC Heading (eg 3.1.1)
TOC Title (eg Compound Analysis)
TOC Page# ( eg 18)


To be honest my background is more databases, so this is a big learning curve for me. Does anybody have any sample code I could leverage / pointers to other websites. I had a quick look on stack overflow, but the code there is orders of magnitude beyond me.

I can visualise the loops I need, I just can't get the various commands to gel, any help would be much appreciated.

Ta