Microsoft Office Tutorials and References
In Depth Information
Working with Appointments
The following screenshot shows the results of adding and executing this code:
The AppointmentItem object is used to create appointments dynamically. An
AppointmentItem object can be used to create a meeting, a one-time appointment,
or a recurring appointment.
Let's perform a demonstration of how to delete a recurring appointment from your
Outlook 2007 calendar, by using VSTO programming.
Open Visual Studio 2008 and create a new solution, as described earlier. Write the
following code, which will dynamically delete an Appointment item, inside the
ThisAddIn.cs file:
private void ThisAddIn_Startup(object sender, System.EventArgs e)
// Reading the calendar folder through MEPIFolder object
Outlook.MAPIFolder PacktCalendarInfo = Application.Session.
// Get the data items in the calendar folder
Outlook.Items PacktCalendarDataItems = PacktCalendarInfo.Items;
// Searching the Appointment items based on subject
Outlook.AppointmentItem PacktAppointmentItem =
PacktCalendarDataItems["Book release"] as Outlook.
Search JabSto ::

Custom Search