I have a directory with many .docx files in it.

I am trying to build a macro to automatically copy and paste the contents of each .docx file into a new sheet in the .xls file.

So far I have pulled together the following snippet of code, which is suitable for pulling in a single, pre-named file into a specific sheet in the excel document:


Please Login or Register  to view this content.
How I'm trying to change this, is to include a for loop so it does the copy&paste routine for every *.docx file in the same folder as the .xls file, and to increment the sheet it would be pasted to. The .xls file will start with only having one worksheet ("sheet1") in it.

Suggestions or recommendations?

Many thanks,


-Aaron