How to read recurrence Pattern of a outlook meeting using redemption using c#.net?

InfoPath alternatives for form designing SharePoint
In this post we will discuss about How to read recurrance Pattern of a outlook meeting using redemption using c#.net? Also you can check out my previous posts on:
Its really very difficult to read all the occurrences of a recurring meeting using any of the APIs available in the market. Sometimes if you will read through outlook apis then it will not give the correct time if user send the meeting from different time zone. Hope the below way some how help you to read the recurrence item.
        RDOSessionClass session = new RDOSessionClass();
                session.Logon(“”, “”, false, false, null, false);
                RDOFolder folder = session.GetDefaultFolder(rdoDefaultFolders.olFolderCalendar);
                RDOItems items = folder.Items;
   foreach (object item in items)
                {
                    if (item is RDOAppointmentItem)
                    {
  RDOAppointmentItem rdoItem = item as RDOAppointmentItem;
  RDORecurrencePattern recPatt = rdoItem.GetRecurrencePattern();
                        int j = 1;
                        for (j = 1; j <= recPatt.Occurrences; j++)
                        {
//This loop will run for the no of ocuurance the recurring meeting contains.
                            RDOAppointmentItem rdoItem1 = null;
                            try
                            {
                                rdoItem1 = (RDOAppointmentItem)recPatt.GetOccurence(j);
                            }
                            catch (System.Exception ex)
                            {
                                MessageBox.Show(ex.InnerException.ToString());
                            }
                        }
}
}
If there will be no end date is selected in the recurring Pattern then the Occurrences count returns 0. But the most important thing is that it also gives the perfect time in case if user changes the timezone.

Similar SharePoint 2013 Tutorials


About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →

Leave a Reply