Calendar + Email

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
 
B

Brian Tillman

A+P said:
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

news://msnews.microsoft.com/microsoft.public.outlook.program_vba may be a
better group.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top