Sub sendMail() Dim email As Object Msg = "This is a test message using WinXP Pro SMTP service..." Set email = CreateObject("CDO.Message") With email .AddAttachment ActiveWorkbook.Path & "\fileName.xls" .From = "someone@somewhere.com" .To = "anyone@anywhere.com" '.CC = "noone@nowhere.com" '.BCC = "joe.blog@joeyblogs.au" .Subject = "This message was generate on " & Date .TextBody = Msg .Send End With
Set email = Nothing
End Sub
Tags: microsoft office, excel, xp, excel
Microsoft Office | Microsoft Office - VBA | Microsoft Outlook | Microsoft Outlook - VBA
Related posts
Comments
Get notified when a new post is published.