HI
How can i delete an existing outlook appointment item.In the time of creating i save the entry id into Database.
Is it possible to delete the item with the help of Entry Id?
Regards
Pradeep
How to delete outlook apppointment item through c#.net
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Master BillaRank #2,229 · 630 reputationPosted Sep 21, 2009, 6:13 AM EDT
my code
private void ThisApplication_Startup(object sender, System.EventArgs e) { Outlook.MAPIFolder calendar = Session.GetDefaultFolder( Outlook.OlDefaultFolders.olFolderCalendar); Outlook.Items calendarItems = calendar.Items; Outlook.AppointmentItem item = calendarItems["Test Appointment"] as Outlook.AppointmentItem; Outlook.RecurrencePattern pattern = item.GetRecurrencePattern(); Outlook.AppointmentItem itemDelete = pattern. GetOccurrence(new DateTime(2006,6,28,8,0,0)); if (itemDelete != null) { itemDelete.Delete(); } } Thank youpradeep kumar3 reputationPosted Oct 19, 2009, 2:00 AM EDT
Thanks for your reply.But i done it like the following code
Microsoft.Office.Interop.Outlook.Application OlApp = new Microsoft.Office.Interop.Outlook.Application();
NameSpace OlNamspace = OlApp.GetNamespace("MAPI");
MAPIFolder AppointmentFolder=OlNamspace.GetDefaultFolder(OlDefaultFolders.olFolderCalendar);
AppointmentFolder.Items.IncludeRecurrences = true;
foreach (AppointmentItem app in AppointmentFolder.Items)
{
if (app.EntryID == SelectedOutlookEntryID)
{
app.Delete();
}
}
Regards
Pradeep