Hi, All
I have a macro that will send an email when it is triggered...But it will only send if my outlook is open. Is there a way to make this work without having to open my email first? Here is the macro I have.
Sub Button7_Click()
Worksheets("Tracker").Unprotect Password:=""
Sheets("Tracker").Range("A2:H17").Select
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = "Hello! - The Board was updated by " & Environ("USERNAME") & " at " & Format(Now(), "hh:mm ddd dd mmm yy")
.Item.To = "xxxxxx@xxx.com;xxxx@xxx.com"
.Item.CC = "xxxxxx@xxx.com;xxxxx@xxx.com;xxxxxxx@xxx.com"
.Item.Subject = "CPS Assignment Board!"
.Item.display
.Item.send
End With
Range("A1").Select
Worksheets("Tracker").Protect Password:=""
End Sub
I have a macro that will send an email when it is triggered...But it will only send if my outlook is open. Is there a way to make this work without having to open my email first? Here is the macro I have.
Sub Button7_Click()
Worksheets("Tracker").Unprotect Password:=""
Sheets("Tracker").Range("A2:H17").Select
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = "Hello! - The Board was updated by " & Environ("USERNAME") & " at " & Format(Now(), "hh:mm ddd dd mmm yy")
.Item.To = "xxxxxx@xxx.com;xxxx@xxx.com"
.Item.CC = "xxxxxx@xxx.com;xxxxx@xxx.com;xxxxxxx@xxx.com"
.Item.Subject = "CPS Assignment Board!"
.Item.display
.Item.send
End With
Range("A1").Select
Worksheets("Tracker").Protect Password:=""
End Sub