Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can someone please help!!
I'm trying to send an automatic email when 2 conditions are met. In column X I have yes/no drop down box. If Column X has a "no" and the date is 14 days older than dates that are in column B I want an email automatically sent to the corresponding email address in Column G.There are about 8 different email address. I have the Send Mail code (below) from Ron deBruins site but I just can't seem to get the worksheet code right. Sub Mail() Dim OutApp As Object Dim OutMail As Object Dim strto As String, strcc As String, strbcc As String Dim strsub As String, strbody As String Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) strto = " strcc = "" strbcc = "" strsub = "Important message" strbody = "Hi there" & vbNewLine & vbNewLine & _ "Cell A1 is changed" With OutMail .To = strto .CC = strcc .BCC = strbcc .Subject = strsub .Body = strbody .Send End With Set OutMail = Nothing Set OutApp = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
send email to each customer email in excel sheet. | Excel Discussion (Misc queries) | |||
send wkbk as an email attachment with an email address copied from | Excel Discussion (Misc queries) | |||
send email with email addresses in a range of cells | Excel Programming | |||
Send Email VBA | Excel Programming | |||
body of email disappears when I send an email from Excel | Excel Discussion (Misc queries) |