Macro For Emailing Worksheets


Posted by Damien on July 12, 2001 10:43 PM

I have written some code that copies a worksheet and attaches it to a email but what i want to do is for the macro to send the e-mail to a specific address every time any ideas I saw a posting on this site a while ago but took little notice. Anyone

Posted by Alix on July 13, 2001 6:04 AM

Try adding this to the code using the address you want the mail sent to and the subject line to be included

mailname = "joe.bloggs@companyname.com"
ActiveWorkbook.SendMail Recipients:=mailname, Subject:="Whatever"

Alix



Posted by David Megnin on July 13, 2001 8:54 AM

Damien,

Could you tell me the code you use to copy a worksheet and attach it to an email? I have a standard letter I must send whenever a form comes in. That would make things much easier,

Thanks!
David