LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default E-mail Attachments


Hi,

Does any one have any suggestions for E-mailing attachments based on
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 t
reference the file name to attach rather than entering the file nam
directly in the code, I receive an error message. Below is the par
(.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 appreciate

--
STEVE
-----------------------------------------------------------------------
STEVEB's Profile: http://www.excelforum.com/member.php...nfo&userid=187
View this thread: http://www.excelforum.com/showthread.php?threadid=39794

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem opening e-mail attachments jstryon Excel Discussion (Misc queries) 0 June 28th 08 12:16 AM
Sending Templates as e-mail Attachments? Excel Template as an e-mail Attachment Excel Discussion (Misc queries) 0 September 5th 07 10:56 PM
E-mail macro - how do I attach multiple attachments? G and (ajk) Excel Discussion (Misc queries) 1 October 9th 06 01:22 PM
send tomail recipient (as attachments) is grey'd out Scottatah Excel Discussion (Misc queries) 1 October 30th 05 08:28 AM
Multiple attachments in Excel e-mail? Peter[_42_] Excel Programming 1 June 12th 04 12:22 PM


All times are GMT +1. The time now is 05:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"