We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem with setting monthly recurrence to calendar

I am new java devloper , and facing one problem regarding setting of monthly recurrence patter in calendar .

Hi,


I am new java devloper, and i facing problem with setting an daily,weakly,monthly,yearly recurrence pattern in calendar in pst file using aspose.email for java.
please give me proper solution for that .

I have created test application on mac os x using eclipse. i have to evaluate aspose.email for (jar file.).but problem is that while creating .pst file recurrence not get set to calendar . any one help me.

and i found exception like this .

Exception in thread "main" class com.aspose.email.system.exceptions.InvalidOperationException: Duration can't be more than period of recurrence.

com.aspose.email.MapiCalendar.a(SourceFile:541) .



help me!!!!!!.

Hello support team,


I am mac os x developer. I have to set weakly,monthly,yearly recurrence pattern to calendar in .pst file. I am using aspose.email for java (jar file).

Below are input and source code .

please give me proper solution for that .

****Source Code

java.util.Calendar calendar = java.util.Calendar.getInstance(java.util.TimeZone.getTimeZone("GMT"));

calendar.set(2015, java.util.Calendar.JANUARY, 1,0,0,0);

Date startDate = calendar.getTime();

calendar.set(2016, java.util.Calendar.MARCH, 1,0,0,0);

Date endDate = calendar.getTime();

MapiCalendarEventRecurrence f_reccurence = new MapiCalendarEventRecurrence();

f_reccurence.setRecurrencePattern(new MapiCalendarWeeklyRecurrencePattern());

f_reccurence.getRecurrencePattern().setPatternType(MapiCalendarRecurrencePatternType.Week);

f_reccurence.getRecurrencePattern().setOccurrenceCount(3);

f_reccurence.getRecurrencePattern().setPeriod(2);

f_reccurence.getRecurrencePattern().setEndType(MapiCalendarRecurrenceEndType.NeverEnd);

mapiWeakly = new MapiCalendar("This is Location", "This is Weekly", "This is description",startDate, endDate);

mapiWeakly.setLocation("This is location");

mapiWeakly.setRecurrence(f_reccurence);



*************************************************




Hi Ajinath,

Thank you for contacting Aspose Support team.

Please try setting the occurrence count as well in addition to these properties for setting it to work and let us know your feedback.

pattern.setOccurrenceCount(3);