gmaxey
11-11-2013, 01:45 PM
Hi,
I have written some code that collects files from a path\folder using FileSytemObject and then loops through each file and writes data about the file (name, last saved, etc.) into a Word document as text or into a Word table as row\cell data.
I would like to expand on this and have the option to write the file data to new Excel worksheet. Dumbing it done to a level I understand:,
Create Instance of Excel
Create New WorkSheet
Create column headings e.g., Name, Path, SavedDate, Type, Size, etc.
For Each oFile in Files
Worksheet.Rows.Add
Send data about file eg., Name, Path, SavedDate, Type, Size, etc. to
Next oFile
Appreciate any code examples or nudges in the right direction to get started. Would I do this using a ADO connection? If so need a little help there as well.
Thanks.
I have written some code that collects files from a path\folder using FileSytemObject and then loops through each file and writes data about the file (name, last saved, etc.) into a Word document as text or into a Word table as row\cell data.
I would like to expand on this and have the option to write the file data to new Excel worksheet. Dumbing it done to a level I understand:,
Create Instance of Excel
Create New WorkSheet
Create column headings e.g., Name, Path, SavedDate, Type, Size, etc.
For Each oFile in Files
Worksheet.Rows.Add
Send data about file eg., Name, Path, SavedDate, Type, Size, etc. to
Next oFile
Appreciate any code examples or nudges in the right direction to get started. Would I do this using a ADO connection? If so need a little help there as well.
Thanks.