I found this code in your site and I happy to use it.
Dim objOutlookMsg As Object Set objOutlook = CreateObject("Outlook.Application") Set objOutlookMsg = objOutlook.CreateItem(0) With objOutlookMsg .To = "email@example.com" .Cc = "firstname.lastname@example.org" .Subject = "Hello World (one more time)..." .Body = "This is the body of message" .HTMLBody = "HTML version of message" .Attachments.Add ("f:\Test.txt") .Send 'Let´s go! Set objOutlookMsg = Nothing Set objOutlook = Nothing End Sub
but it did not work. Could you help me.