Hi,
Does any one have any suggestions for E-mailing attachments based on a cell value? My current macro works great, however, I must enter:
Attachemnts.add "file name" for the Macro to function.
Currently I reference cells in the worksheet named "Mail" for the "To", "CC" and "Subject" and everyhting runs smooth. However, if I try to reference the file name to attach rather than entering the file name directly in the code, I receive an error message. Below is the part (.Attachment) of the code that is not working.
.To = ThisWorkbook.Sheets("Mail").Cells(2, a + 2).Value
.CC = ThisWorkbook.Sheets("Mail").Cells(2, a + 3).Value
.Subject = ThisWorkbook.Sheets("Mail").Cells(2, a + 4).Value
.Attachments = ThisWorkbook.Sheets("Mail").Cells(2, a + 5).Value
Any suggestions would be greatly appreciated
Bookmarks