Veeru
07-26-2017, 12:43 PM
Hi,
while working on one macro for outlook . I want to outlook to send automatic mail to team memebers on specific day and time..
Like every Monday at 4:00 pm .
I have one code which send mail on specific day but not regularly.
we need to enter a date and on reaching that day it will send mail.
Sub SendMail()
Dim OutApp As Object
Dim Outmail As Object
Dim strBody As String
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set Outmail = OutApp.CreateItem(0)
strBody = "Test"
On Error Resume Next
With Outmail
.To = "test@test.com" 'change "test@test.com" into "yourownmailadres@mail.com" to make the macro really work
.CC = ""
.BCC = ""
.Subject = "Test - No Reply - Automatic mail"
.HTMLBody = strBody
.Display
.DeferredDeliveryTime = 7 / 28 / 2017
End With
On Error GoTo 0
Set Outmail = Nothing
Set OutApp = Nothing
End Sub
Can anyone lookinto this and provide suggestion how we can modify it to send mail regularly every Monday at 4 pm.
thanks in advance
while working on one macro for outlook . I want to outlook to send automatic mail to team memebers on specific day and time..
Like every Monday at 4:00 pm .
I have one code which send mail on specific day but not regularly.
we need to enter a date and on reaching that day it will send mail.
Sub SendMail()
Dim OutApp As Object
Dim Outmail As Object
Dim strBody As String
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set Outmail = OutApp.CreateItem(0)
strBody = "Test"
On Error Resume Next
With Outmail
.To = "test@test.com" 'change "test@test.com" into "yourownmailadres@mail.com" to make the macro really work
.CC = ""
.BCC = ""
.Subject = "Test - No Reply - Automatic mail"
.HTMLBody = strBody
.Display
.DeferredDeliveryTime = 7 / 28 / 2017
End With
On Error GoTo 0
Set Outmail = Nothing
Set OutApp = Nothing
End Sub
Can anyone lookinto this and provide suggestion how we can modify it to send mail regularly every Monday at 4 pm.
thanks in advance