Posted to microsoft.public.excel.programming
|
|
E-mail Attachments
See this macro for a example
http://www.rondebruin.nl/mail/folder2/files.htm
--
Regards Ron de Bruin
http://www.rondebruin.nl
"STEVEB" wrote in message
...
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
--
STEVEB
------------------------------------------------------------------------
STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872
View this thread: http://www.excelforum.com/showthread...hreadid=397945
|