Asalhaljayar
New member
Can i create a email form to be filed by macro for monthly
Hello AsalhaljayarCan i create a email form to be filed by macro for monthly
Sub SendEmailWithDynamicSubject()
Dim OutApp As Object
Dim OutMail As Object
Dim MailBody As String
Dim SubjectText As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
SubjectText = "Report: " & Format(Now, "mmmm yyyy")
OutMail.To = "[email protected]"
OutMail.Subject = SubjectText
MailBody = "Dear Shovon," & vbCrLf & vbCrLf & _
"Attached is the monthly report for your review." & vbCrLf & vbCrLf & _
"Sincerely," & vbCrLf & _
"Lutfor"
OutMail.Body = MailBody
OutMail.Display
Set OutMail = Nothing
Set OutApp = Nothing
End Sub