I’m in the process of trialing the Aspoe.Email , and posted a couple of questions regarding recurrence appointments, in my case creating them and adding them to a PST file. I’ve encountered another problem, Using the below:
DateTime StartDate = new DateTime(2015, 9, 9, 9, 0, 0);
DateTime endByDate = new DateTime(2015, 9, 30, 9, 5, 0);
MapiCalendar appointment = new MapiCalendar(“Location”, “EndAfterNOccurrencesCHECK”, “Description”, StartDate, endByDate);
MapiCalendarEventRecurrence mapiCalendarEventRecurrence = new MapiCalendarEventRecurrence();
string rrule = string.Format(“DTSTART:{0}\r\nRRULE:{1}”, StartDate.ToString(“yyyyMMdd”), “FREQ=DAILY”);
// Set the Daily recurrence
var rec = new MapiCalendarDailyRecurrencePattern {
PatternType = MapiCalendarRecurrencePatternType.Day,
Period = 1,
WeekStartDay = DayOfWeek.Sunday,
EndType = MapiCalendarRecurrenceEndType.EndAfterNOccurrences,
OccurrenceCount = GetOccurrenceCount(StartDate, endByDate, rrule, 0),
};
mapiCalendarEventRecurrence.RecurrencePattern = rec;
appointment.Recurrence = mapiCalendarEventRecurrence;
PersonalStorage pst = PersonalStorage.FromFile(pstFileName);
FolderInfo calendarFolder = pst.RootFolder.GetSubFolder(“Calendar”);
calendarFolder.AddMapiMessageItem(appointment);
22 occurrences in total, at present I am having to using DDay.ICal to calculate the number of occurrences as GetOccurrenceCount does not appear to work in the latest build (see other post) However when I ad the item to a pst file it appears to ignore the number of occurrences and the time is incorrect, [screen shot](http://images.devs-on.net/Image/GGQOXfKD7YIYEYez-Region.png)
, I’m using build 5.6.0.0
Do you have a downloadable sample projects using all the MapiCalendarEventRecurrence classes that I can trial please? ie adding recurrence items to a PST file? I don’t think I have had any any success as of yet.