A
A+P
I'm running Outlook 2003 on Exchange 2003 server.
I would like to schedule an automated email that will be send out to the
same recipients with the same msg everyday from Mon-Fri in the morning based
on a reoccuring item I enter into my calendar.
All I have so far is the following code. How do I tell Outlook to determine
which reoccuring calendar item I want this message to be sent.
Private Sub Application_Reminder(ByVal Item As Object)
Dim objMsg As MailItem
' create new outgoing message
Set objMsg = Application.CreateItem(olMailItem)
' your reminder notification address
objMsg.To = "(e-mail address removed)"
objMsg.CC = "(e-mail address removed)"
objMsg.Subject = "Reminder: " & Item.Subject
' handle calendar items that can generate reminders
Select Case Item.Class
Case olAppointment '26
objMsg.Body = _
"Start: " & Item.Start & vbCrLf & _
"End: " & Item.End & vbCrLf & _
"Location: " & Item.Location & vbCrLf & _
"Details: " & vbCrLf & Item.Body
End Select
' send the message
objMsg.Send
Set objMsg = Nothing
End Sub
I would like to schedule an automated email that will be send out to the
same recipients with the same msg everyday from Mon-Fri in the morning based
on a reoccuring item I enter into my calendar.
All I have so far is the following code. How do I tell Outlook to determine
which reoccuring calendar item I want this message to be sent.
Private Sub Application_Reminder(ByVal Item As Object)
Dim objMsg As MailItem
' create new outgoing message
Set objMsg = Application.CreateItem(olMailItem)
' your reminder notification address
objMsg.To = "(e-mail address removed)"
objMsg.CC = "(e-mail address removed)"
objMsg.Subject = "Reminder: " & Item.Subject
' handle calendar items that can generate reminders
Select Case Item.Class
Case olAppointment '26
objMsg.Body = _
"Start: " & Item.Start & vbCrLf & _
"End: " & Item.End & vbCrLf & _
"Location: " & Item.Location & vbCrLf & _
"Details: " & vbCrLf & Item.Body
End Select
' send the message
objMsg.Send
Set objMsg = Nothing
End Sub