View Single Post
  #2  
Old January 11th 07, 04:47 PM posted to microsoft.public.outlook.calendaring,microsoft.public.outlook.program_vba
Brian Tillman
external usenet poster
 
Posts: 17,452
Default Calendar + Email

A+P wrote:

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 = "
objMsg.CC = "
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/microsof...ok.program_vba may be a
better group.

Ads