Use the Dir function to loop through the files in the directory. There is a good example of how to do that in VBA Help.
Then, for each file name, do a DLookup in your table to see if it matches. If it does, send the e-mail; otherwise, move on to the next file name.
"G" wrote:
[Quoted Text] > How do I go through a list of files in a directory, match each of the files > names to the names in the ms access table, and then send each match up an > email with the file as an attachment?
|