Advanced Excel Tips-Macros/VBA
Q : Attach Active Workbook in an Email
Ans :
Sub Send_Mail()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail To = "[email protected]" Subject = "Lalasaheb Gaikwad Report" Body ="" & "Hi Team," & "" & "Please find attached Report." & ""Attachments.Add ActiveWorkbook.FullName Display
'.Send
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Use this macro code to quickly send your active workbook in an e-mail. You can change the subject, email, and body text in code and if you want to send this mail directly, use ".Send" instead of ".Display".
Click here to claim your Sponsored Listing.
Category
Contact the school
Address
Pune