Hi,
I know that in Outlook 2010 each appointmentItem has the same EntryID for recurring meetings. Is there another unique ID that I could use for each occurrence in a recurring meeting series?
My second question is, can we find the each occurrence in a recurring meeting by using entryID. I will paste my code below.
I am getting an error in this line "Outlook.AppointmentItem RecurringItem = AllAppointments.Find(filter1);"
Error is "Condition is not valid."
The above 2 function inside the ThisAddin Class.
Thanks & Regards
Bobbin Paulose
I know that in Outlook 2010 each appointmentItem has the same EntryID for recurring meetings. Is there another unique ID that I could use for each occurrence in a recurring meeting series?
My second question is, can we find the each occurrence in a recurring meeting by using entryID. I will paste my code below.
Code:
[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] [/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI]Outlook.Explorer OutllookExplorer;[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] private void ThisAddIn_Startup(object sender, System.EventArgs e)[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] {[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] //System.Windows.Forms.MessageBox.Show("RecurringAppointmentProject");[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] Outlook.Application OutlookApplication = (Outlook.Application)this.Application;[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] OutllookExplorer = (Outlook.Explorer)OutlookApplication.ActiveExplorer();[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] OutllookExplorer.FolderSwitch += new Outlook.ExplorerEvents_10_FolderSwitchEventHandler(OutllookExplorer_FolderSwitch);[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] }[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] [/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI]private void OutllookExplorer_FolderSwitch()[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] {[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] Outlook.Items AllAppointments;// = new Outlook.Items();[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] DateTime StartDate = new DateTime(2006, 8, 9, 0, 0, 0);[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] DateTime EndDate = new DateTime(2012, 12, 31, 0, 0, 0);[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] string filter1 = "[Start] <= '" + StartDate.ToString() + "'";[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] //filter1 = "[Subject] = 'New Recurrence 123'";[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] filter1 = "[EntryID] = '00000000651178B5C230CC4687671446CEE641F9A4122300'";[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] AllAppointments = folder.Items;[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] AllAppointments.Sort("[Start]");[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] AllAppointments.IncludeRecurrences = true;[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] Outlook.AppointmentItem RecurringItem = AllAppointments.Find(filter1);[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] int i = 1;[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] while (RecurringItem!=null)[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] {[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] System.Windows.Forms.MessageBox.Show( i.ToString() + " : " + RecurringItem.Subject.ToString() + " : "+ Convert.ToString(RecurringItem.Body) + " : " + RecurringItem.GlobalAppointmentID.ToString());[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] RecurringItem = AllAppointments.FindNext();[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] i++;[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] }[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI] }[/FONT][/COLOR]
[COLOR=#333333][FONT=Segoe UI]
Error is "Condition is not valid."
The above 2 function inside the ThisAddin Class.
Thanks & Regards
Bobbin Paulose