hi all new to this need help
hi all new to this need help
Hello jarred.pierce,
Welcome to Excelforum. Be a part of large Excel community. Enjoy Learning.
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
thank you. where can I post a question?
Hello All,
I am very new at writing and/ or looking at code. I have found one that works for me with the exception of a few things. I would greatly appreciate any help (in layman's terms) with auto sending an email from excel when a target date is 14 days away. I would like for the program to generate the email 14 days away from the expiration date and be specific to an email address associated with the subject.
Thank You.
here is what I have found to work so far
Sub waiverexp()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "Hi there" & vbNewLine & vbNewLine & _
"Waiver to Permit Subcontractor to Install Network Cables for Closed Circuit Television at Buildings EXPIRES on 9/30/2014 " & vbNewLine & _
"Contact Safety if an Extension is needed" & vbNewLine & _
"Thank You" & vbNewLine & _
"Jarred Pierce"
On Error Resume Next
With OutMail
.To = "email address"
.CC = ""
.BCC = ""
.Subject = "Waiver Expiration"
.Body = strbody
'You can add a file like this
'.Attachments.Add ("C:\test.txt")
.Send 'or use .Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Not here. This is off topic subforum.
go to Excel Programming / VBA / Macros
use proper titel according to the Forum rules.
Use Code tags around your code.
All of instractions you can find in Rules.
thank you....
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks