I have a folder of files with names like D0000025667-T04292.pdf, D0000025668-T02119.pdf, D0000025670-T01125.pdf
and so on.
I have an MS access database table, with values as follows:
**Dealer Code Email**
T04292 [email protected]
T04292 [email protected]
T02119 [email protected]
T01125 [email protected]
RS0009 [email protected]
RS0001 [email protected]
C01020 [email protected]
I need to get the 'For Dealer' code from the table and search in folder. Finally I need to attach matching files to an email to send to the address listed in the database e.g. Dealer Code T04292
matches file D0000025667-T04292.pdf
which needs to be sent to [email protected]
.
I have one mail function where I can directly specify the attaching file path, but now I need to search and match the files need to attach.