StartDownloadsServiceSamplesWorkshopsContact DeutschEnglish
 
Samples
General
Outlook®
 
Awarded by
Microsoft since 2005:
mvp logo
VBOffice Info
Visitors1642856
Impressions6219758
Links
Imprint
Privacy Policy
Contact
Calendar: Send a new appointment automatically by e-mail
Author: Michael BauerHomepage
Date: 10.11.2006Accessed: 28469
  
Description

This sample monitors your calendar, and every new appointment will also be sent by e-mail. For that, the appointment must be flagged as a meeting item.

If you don't want to monitor the default calendar but a subfolder if it, then remove the apostrophe before the second Set Folder statement, and replace the name with the name of your subfolder.

Private WithEvents Items As Outlook.Items

Private Sub Application_Startup()
  Dim Ns As Outlook.Namespace
  Dim Folder As Outlook.MapiFolder

  Set Ns = Application.GetNamespace("MAPI")
  Set Folder = Ns.GetDefaultFolder(olFolderCalendar)
  ' Set Folder = Folder.Folders("Subfolder")
  Set Items = Folder.Items
End Sub

Private Sub Items_ItemAdd(ByVal Item As Object)
  Dim Appt As Outlook.AppointmentItem

  If TypeOf Item Is Outlook.AppointmentItem Then
    Set Appt = Item
    Appt.Recipients.Add "abc@domain.com"
    Appt.MeetingStatus = olMeeting
    Appt.Save
    Appt.Send
  End If
End Sub
 
 

ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the ... [more]

 

Access the master category list in the blink of an eye, share your categories in a network, get a reminder service, and ... [more]

 

SAM automatically sets the sender, signature, and folder for sent items, for instance based on the recipient ... [more]

 

OLKeeper reliably prevents users from closing their Outlook window and thus possibly missing reminders or ... [more]