Hello,
I want to create an email and attach several attachments from a path based on a criteria using VBA.
I have a list of unique codes in column F and the following email in column H.
Capture.PNG
I also have several files all stored int he following path: "C:\Users\Username\Desktop\TestFolder". All files end with an unique five digits code to the right. See below:
- Project Brown 11111.xlsx
- Project Red 22222.xlsx
- Project Green 11111.xlsx
- Project Blue 11111.xlsx
I want the code to look for the unique five digit value and for each unique code create an email and attach all files with the same unique code.
I have tried with the code below, but it only attachs one file to each mail.
Can anyone help me?
Please Login or Register to view this content.
Bookmarks