Recently developedOutlook addin,To useOutllookOfCalendar,Another feature is that when you create a new appointment or meeting, these appointments or meetings may have the same region. Therefore, after you create a appointment, a fixed-cycle appointment will automatically appear.
Since no similar development has been done beforeMsdnWrite a new appointmentProgramBut it is not clear how to loop it. AgainOutlook.AppointmentitemThis class foundRecurrencestateAttribute, it seems that onlyRecurrence appointmentThis is a read-only attribute and cannot be set. Therefore, I am in trouble and do not know how to do it.
I checked it online, and I felt that there was no result.
Later, I tried it. The program is as follows, and the solution can be solved. Hope to help you.
Private void createappointment ()
{
Outlook. appointmentitem pappointmentitem = NULL;
Redemption. safeappointmentitem rappointmentitem = NULL;
Rappointmentitem = New Redemption. safeappointmentitemclass ();
Outlook. recurrencepattern IREC = NULL;
Pappointmentitem = (outlook. appointmentitem) This. outlookapplication. createitem (outlook. olitemtype. olappointmentitem );
Rappointmentitem. Item = pappointmentitem;
Pappointmentitem. Subject = "test daily ";
Pappointmentitem. Start = datetime. parse ("08:00:00. 000 ");
Pappointmentitem. End = datetime. parse ("08:00:00. 000"). addminutes (30 );
Pappointmentitem. alldayevent = false;
Pappointmentitem. sensiti.pdf = outlook. olsensiti.pdf. olprivate;
Rappointmentitem. rtfbody = "test outlook appointment ";
Pappointmentitem. reminderset = true;
Pappointmentitem. reminderminutesbeforestart = 5;
Pappointmentitem. reminderplaysound = false;
IREC = pappointmentitem. getrecurrencepattern ();
IREC. Duration = 30;
IREC. starttime = datetime. parse ("08:00:00. 000 ");
IREC. recurrencetype = outlook. olrecurrencetype. olrecursdaily;
IREC. interval = 1;
IREC. noenddate = false;
IREC. patternenddate = datetime. parse ("08:00:00. 000 "). adddays (10);
IREC. occurrences = 10;
IREC. patternstartdate = datetime. parse ("08:00:00. 000 ");
Pappointmentitem. Categories = "";
Pappointmentitem. Save ();
}