ClearRecurrencePattern Problem

  • Thread starter Thread starter Mary Smith
  • Start date Start date
M

Mary Smith

I imported some reoccurring appointments and I am using C# to get all
upcoming appointments. I found out you need to use ClearRecurrencePattern to
get the current appointment but it always show the appointments for last
year. If I enter new reoccurring appointments it works correctly. Any
ideas?
 
??? Why exactly would you do that? What are you trying to do?
ClearRecurrencePattern removes the recurrence pattern and tuns a recurring
appointment to a non-recurring one with the start of the new appointmentset
to teh start of the first instance of the recurrence series.
If you need the upcoming appointments, look at
http://www.outlookcode.com/article.aspx?id=30
Pay attention to the "Recurring items" section.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
I am trying to get a list of all upcoming appointments. When the appointment
is a recurrence I get the date it was started instead of the next
occurrence. Example one of my appointments was set to start on 1/16/2003
every year but instead of getting the next appointment which is 1/16/2009 I
get 1/16/2003. When I use ClearRecurrencePattern it removes the series and
return 1/16/2008 but I think it suppose to return 1/16/2009. Does this sound
correct? Here is a sample of my code.



bool OC = coAppointment.IsRecurring;



if (OC == false)

{

Console.WriteLine(newreminder);

Console.WriteLine(coAppointment.Start);

Console.WriteLine(coAppointment.IsRecurring);

}

else

{

Console.WriteLine(newreminder);

coAppointment.ClearRecurrencePattern;

Console.WriteLine(coAppointment.Start);

Console.WriteLine(coAppointment.IsRecurring);

}
 
Back
Top