Hi,
Hi,
<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:navy”>public static void MapiCalendar_ThirdSaturdayOfJanuary_Email_708193()
{
MapiCalendar mapiMonthly = <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:navy”>null;
java.util.Calendar calendar =
java.util.Calendar.getInstance(java.util.TimeZone.getTimeZone(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“GMT”));
calendar.set(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>2017, java.util.Calendar.<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:#660E7A”>JANUARY, <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>1, <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>0, <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>0, <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>0);
Date startDate = calendar.getTime();
calendar.set(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>2017, java.util.Calendar.JANUARY, 1, 0, 0, 0);
Date endDate = calendar.getTime();
<span style=“font-size:
9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:navy”>try
{
MapiCalendar cal = <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:navy”>new MapiCalendar();
cal.setLocation(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“Location”);
cal.setSubject(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“Subject”);
cal.setBody(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“Description”);
cal.setStartDate(startDate);
<span style=“font-size:
9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:gray”>// Set the yearly recurrence
MapiCalendarMonthlyNthRecurrencePattern rec = <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:navy”>new MapiCalendarMonthlyNthRecurrencePattern();
rec.setEndType(MapiCalendarRecurrenceEndType.<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:#660E7A”>NeverEnd);
rec.setOccurrenceCount(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>0);
rec.setPatternType(MapiCalendarRecurrencePatternType.<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:#660E7A”>MonthNth);
rec.setPeriod(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>12);
rec.setWeekStartDay(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>0);
rec.setDayOfWeek(MapiCalendarDayOfWeek.<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:#660E7A”>Saturday);
rec.setPosition(DayPosition.<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:#660E7A”>Third);
cal.getRecurrence().setRecurrencePattern(rec);
cal.save(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“ThirdSaturdayOfJanuary.msg”, AppointmentSaveFormat.<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:#660E7A”>Msg);
}
<span style=“font-size:
9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:navy”>catch (Exception ex)
{
System.<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:#660E7A”>out.println(ex.getMessage());
}
}
Hi,
class com.aspose.email.system.exceptions.ArgumentException: The start date should be less than the date completed.
com.aspose.email.MapiTask.b(SourceFile:557)
com.aspose.email.MapiTask.i(SourceFile:1416)
com.aspose.email.MapiTask.setRecurrence(SourceFile:691)
Please advise.
Thanks
Hi,
<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:navy”>public static void Email_711545()
{
java.util.Calendar calendar =
java.util.Calendar.getInstance(java.util.TimeZone.getTimeZone(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“GMT”));
calendar.set(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>2016, Calendar.<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:#660E7A”>APRIL, <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>13, <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>0, <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>0, <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>0);
Date startDate = calendar.getTime();
calendar.set(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>2016, java.util.Calendar.<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:#660E7A”>APRIL, <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>14, <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>0, <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>0, <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>0);
Date dueDate = calendar.getTime();
MapiTask task = <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:navy”>new MapiTask(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“This is a test task”,<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:green”>“Sample Body”, startDate,dueDate);
MapiCalendarMonthlyRecurrencePattern
rec = <span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:navy”>new MapiCalendarMonthlyRecurrencePattern();
rec.setDay(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>13);
rec.setPeriod(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>1);
rec.setPatternType(MapiCalendarRecurrencePatternType.<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:#660E7A”>Month);
rec.setEndType(MapiCalendarRecurrenceEndType.<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:#660E7A”>NeverEnd);
task.setRecurrence(rec);
task.save(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“Monthly.msg”,TaskSaveFormat.<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:#660E7A”>Msg);
}
Hi,
java.util.Calendar calendar = java.util.Calendar.getInstance(java.util.TimeZone.getTimeZone(“GMT”));
calendar.set(2016, Calendar.APRIL, 13, 4, 0, 0);
Date startDate = calendar.getTime();
calendar.set(2016, java.util.Calendar.APRIL, 14, 4, 0, 0);
Date dueDate = calendar.getTime();
MapiTask task1 = new MapiTask(“This is a test task”,“Sample Body”, startDate,dueDate);
MapiCalendarMonthlyRecurrencePattern rec = new MapiCalendarMonthlyRecurrencePattern();
rec.setDay(15);
rec.setPeriod(1);
rec.setPatternType(MapiCalendarRecurrencePatternType.Month);
rec.setEndType(MapiCalendarRecurrenceEndType.NeverEnd);
task1.setDateCompleted(calendar.getTime());
task1.setStatus(MapiTaskStatus.Complete);
task1.setRecurrence(rec);
task1.save(“Monthly.msg”,TaskSaveFormat.Msg);
Hi,
Hi,
Hi,
We are sorry for the inconvenience caused to you.
The thread was somehow de-linked from the logged ticket and that is why you couldn’t receive the notification about the fix version. Please download the latest version of Aspose.Email for Java 6.5.0 that contains the fix for this issue.