Dear forum readers,
I am new to this site and need some help.
I have no experience in VBA, so pls bear with me.
I have created an excel sheet, in which I have put the date of today and a colum of various dates. Pls see attached sheet.
The goal is that I want excel to email me automatically as soon as the date in the colom is equal to the current date.
I also want excel to email me the info corresponding to the date.
Elsewhere I found a code to adapt it, but it's not really working.
at work i use LOTUS notes for email.
The following is in the sheet:
where D1 is today's date and column A, are the different dates.
And when a cell in column A equals D1 or 2 days prior or 1 day prior to today's date, automatic email is sent to a specific email address with information in corresponding rows ( deposit and deposit #) of the "matured" date.
This is the code i adapted:
Sub Sendmail()
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
sTo = "anlin1607@yahoo.com"
sCC = ""
sBCC = ""
sSubject = "Verlopen deposito"
strbody = "Good Morning" & vbNewLine & vbNewLine & _
"Here is a message" & vbNewLine & vbNewLine & _
"The following deposit has matured:"
With OutMail
.To = sTo
.CC = sCC
.BCC = sBCC
.Subject = sSubject
.Body = strbody
.Send
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
The problem is that I receive an email, but don't know how to code so that the information is sent along.
I would appreaciate all the help, so this can work ASAP.
Thank you and blesses,
Angela
Bookmarks