Develop appointments or meetings with recurrence

Source: Internet
Author: User

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 ();


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.