I have a folder on my C:\ drive that has bunch of excel spread sheets. I want to move through each of the spreadsheets and see if a certain portion of the name of spreasheet matches with my string criteria. If it macthes, I like to export that file into access table automatically and then I like to delete that file from the folder right after it is imported into the access table.
There are two challenges here for me:
1) How to move through each of the excel files in the folder using VBA and doing the string match.
2) I know Docmd.Transfer spreadsheet could do the import thing but the problem is I don't know the exact file name in the folder. Those excel files are dumped from outlook into the folder and have time stamp on it to avoid overwriting of the files of the same name.
For example ..... my file name could be 20060405_084332_ImpData
The first part is the time stamp which will vary for the same file depending upon when it was received by outlook.
Any ideas/thoughts how to overcome these two challenges would be really appreciated.
I am stuck here.
Thanks,
J
There are two challenges here for me:
1) How to move through each of the excel files in the folder using VBA and doing the string match.
2) I know Docmd.Transfer spreadsheet could do the import thing but the problem is I don't know the exact file name in the folder. Those excel files are dumped from outlook into the folder and have time stamp on it to avoid overwriting of the files of the same name.
For example ..... my file name could be 20060405_084332_ImpData
The first part is the time stamp which will vary for the same file depending upon when it was received by outlook.
Any ideas/thoughts how to overcome these two challenges would be really appreciated.
I am stuck here.
Thanks,
J