Excelnoub
Member
Can this be done even if the Excel spreadsheet is closed?
First off, this code is unfinished but functional when you hit the macro...
Sub Mail_small_Text_Outlook()
'Working in Office 2000-2010
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "Project number "" will expire today at 02:00PM"
On Error Resume Next
With OutMail
.To = "insert your email"
.cc = ""
.BCC = ""
.Subject = "Project number """
.Body = strbody
.Send 'or use .Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
I need the following but i'm not to sure it is possible... based on previous views of multi forums...
I need the strbody = "Project number "" will expire today at 02:00PM" the "" to look for the information in my column C vs my Column A to add the information.
Column C = Dates
Column A = Text
If column C = Date (today) then send email with the following strbody: Project number Text will expire today at 02:00PM.
Example: User adds 2012/07/12 in column C <---- then it will send an email with the right info.
User adds 2012/07/16 <---- Then it will only send on that date.
Is this possible?
Can outlook be able to send an email if excel is closed or does the worksheet needs to be open?
First off, this code is unfinished but functional when you hit the macro...
Sub Mail_small_Text_Outlook()
'Working in Office 2000-2010
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "Project number "" will expire today at 02:00PM"
On Error Resume Next
With OutMail
.To = "insert your email"
.cc = ""
.BCC = ""
.Subject = "Project number """
.Body = strbody
.Send 'or use .Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
I need the following but i'm not to sure it is possible... based on previous views of multi forums...
I need the strbody = "Project number "" will expire today at 02:00PM" the "" to look for the information in my column C vs my Column A to add the information.
Column C = Dates
Column A = Text
If column C = Date (today) then send email with the following strbody: Project number Text will expire today at 02:00PM.
Example: User adds 2012/07/12 in column C <---- then it will send an email with the right info.
User adds 2012/07/16 <---- Then it will only send on that date.
Is this possible?
Can outlook be able to send an email if excel is closed or does the worksheet needs to be open?