I need a thread to send an email out with in 30 days of a date to remind of a due date using macros. Need help please. I have the email set up just need the 30 days
I need to send an email when the date in the column reaches 30 days. I need help please.
This is what I have and it works, I just need to add 30 day string. Is this possible???
private Sub CommandButton7_Click()
Dim outApp As Object
Dim outMail As Object
Dim Strbody As String
Set outApp = CreateObject("outlook.Application")
Set outMail = outApp.CreateItem(0)
Strbody = "Email."
On Error Resume Next
With outMail
.to = "@@@@"
.Subject = "Email "
.Body = Strbody
.send
End With
On Error GoTo 0
Set outMail = Nothing
Set outApp = Nothing
End Sub
I have tried this but it does not work.
Stay in the outbox untill this date and time
.DeferredDeliveryTime = "1/6/2007 10:40:00 AM"
'Wait four hours
.DeferredDeliveryTime = DateAdd("h", 4, Now)
'in 30 days
.DeferredDeliveryTime = DateAdd("d", 30, Now)
Last edited by ranman256; J
I need to send an email when the date in the column reaches 30 days. I need help please.
This is what I have and it works, I just need to add 30 day string. Is this possible???
private Sub CommandButton7_Click()
Dim outApp As Object
Dim outMail As Object
Dim Strbody As String
Set outApp = CreateObject("outlook.Application")
Set outMail = outApp.CreateItem(0)
Strbody = "Email."
On Error Resume Next
With outMail
.to = "@@@@"
.Subject = "Email "
.Body = Strbody
.send
End With
On Error GoTo 0
Set outMail = Nothing
Set outApp = Nothing
End Sub
I have tried this but it does not work.
Stay in the outbox untill this date and time
.DeferredDeliveryTime = "1/6/2007 10:40:00 AM"
'Wait four hours
.DeferredDeliveryTime = DateAdd("h", 4, Now)
'in 30 days
.DeferredDeliveryTime = DateAdd("d", 30, Now)
Last edited by ranman256; J