Hi Ashley,
Hi,
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,
};