Mapi Calendar Recurring appointments

I'm currently using a temporary unrestricted license and doing some further testing. I'm having trouble creating the following appointment :
http://screencast.com/t/Ffm04RjDO6Vx
This is what I have so far
TimeZone localZone = TimeZone.CurrentTimeZone;
TimeSpan ts = localZone.GetUtcOffset(DateTime.Now);
DateTime StartDate = new DateTime(2015, 10, 14, 12,0,0);
StartDate = StartDate.Add(ts);
DateTime endByDate = new DateTime(2015, 10, 14, 12, 30, 0);
endByDate = endByDate.Add(ts);
DateTime endByDateOccurrenceCount = new DateTime(2016, 07, 12, 23, 0, 0);
endByDateOccurrenceCount = endByDateOccurrenceCount.Add(ts);



MapiCalendar cal = new MapiCalendar("Subject", "Sample Body", "", StartDate, endByDate);

var rec = new MapiCalendarMonthlyNthRecurrencePattern {
DayPosition = Aspose.Email.Mail.Calendaring.DayPosition.Second,
Period = 1,
DayOfWeek = MapiCalendarDayOfWeek.Wednesday,
PatternType = MapiCalendarRecurrencePatternType.MonthNth,
EndType = MapiCalendarRecurrenceEndType.EndAfterDate,
OccurrenceCount = GetOccurrenceCount(StartDate, endByDateOccurrenceCount, "FREQ=MONTHLY;INTERVAL=1;BYDAY=WE;BYSETPOS=2;UNTIL=20160712T230000Z"),
WeekStartDay = DayOfWeek.Monday,

};
cal.Recurrence.RecurrencePattern = rec;
cal.Save(@"C:\Users\Desktop\Monthly.msg", AppointmentSaveFormat.Msg);

Would it also be possible to confirm how the following would be created for a mapicalendar?

http://screencast.com/t/DVHwWgjR

Thanks

Hi Ashley,


Thank you for contacting Aspose support team.

I have tested both the monthly and daily recurrences and faced issues. Monthly recurrence bug is logged under Id:EMAILNET-34999 and daily recurrence issue with “Every Weekday” is logged under Id:EMAILNET-35000 for further investigation by the product team. I shall write here as soon as some feedback is received in this regard.

Hi,


I was wondering if there is any more new regarding this? Do you know if this will be fixed in the next release? If it will be, do you know when the next release will be?

Thanks

Hi Ashley,

Thank you for writing us again.

Daily recurrence with “Every Weekday” as mentioned [here](http://screencast.com/t/DVHwWgjR) can be achieved using following sample code where PatternType = MapiCalendarRecurrencePatternType.Week is used instead of PatternType = MapiCalendarRecurrencePatternType.Day.

TimeZone localZone = TimeZone.CurrentTimeZone;

TimeSpan ts = localZone.GetUtcOffset(DateTime.Now);

DateTime StartDate = new DateTime(2015, 10, 14, 12, 0, 0);

StartDate = StartDate.Add(ts);

DateTime endByDate = new DateTime(2015, 10, 14, 12, 30, 0);

endByDate = endByDate.Add(ts);

DateTime endByDateOccurrenceCount = new DateTime(2016, 07, 12, 23, 0, 0);

endByDateOccurrenceCount = endByDateOccurrenceCount.Add(ts);

MapiCalendar cal = new MapiCalendar(“Subject”, “Sample Body”, “”, StartDate, endByDate);

var rec = new MapiCalendarDailyRecurrencePattern

{

Period = 1,

DayOfWeek = MapiCalendarDayOfWeek.Monday | MapiCalendarDayOfWeek.Tuesday | MapiCalendarDayOfWeek.Wednesday | MapiCalendarDayOfWeek.Thursday | MapiCalendarDayOfWeek.Friday,

PatternType = MapiCalendarRecurrencePatternType.Week,

EndType = MapiCalendarRecurrenceEndType.EndAfterNOccurrences,

OccurrenceCount = 10,

WeekStartDay = DayOfWeek.Monday,

};

cal.Recurrence.RecurrencePattern = rec;

cal.Save(path + @“DailyEveryWeekdayPatWeek.msg”, AppointmentSaveFormat.Msg);

I am glad to share that other issue logged under Id:EMAILNET-34999 is resolved and will be available in upcoming release expected in first week of Nov 2015.

The issues you have found earlier (filed as EMAILNET-34999) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi,

Thank you for your patience. To get such recurrence use PatternType Week instead Day, like this:

var rec = new MapiCalendarDailyRecurrencePattern
{
Period = 1,
DayOfWeek = MapiCalendarDayOfWeek.Monday | MapiCalendarDayOfWeek.Tuesday | MapiCalendarDayOfWeek.Wednesday | MapiCalendarDayOfWeek.Thursday | MapiCalendarDayOfWeek.Friday,
PatternType = MapiCalendarRecurrencePatternType.Week,
EndType = MapiCalendarRecurrenceEndType.EndAfterNOccurrences,
OccurrenceCount =10,// GetOccurrenceCount(StartDate, endByDateOccurrenceCount, “FREQ=DAILY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=2;UNTIL=20160712T230000Z”),
WeekStartDay = DayOfWeek.Monday,
};