Dim Email As Outlook.Application
Set Email = New Outlook.Application
Dim Sr As String
Dim newmail As Outlook.MailItem
Set newmail = Email.CreateItem(olMailItem)
newmail.To = "abc@gmail.com"
newmail.CC = "xyz@gmail.com"
newmail.Subject = "This is an automated Email"
newmail.HTMLBody = "Hi," & vbNewLine & vbNewLine & "This is a test email from Excel" & _
vbNewLine & vbNewLine & _
"Regards," & vbNewLine & _
"VBA Coder"
Sr = ThisWorkbook.FullName
newmail.Attachments.Add Sr
newmail.Send