Microsoft.Office.Interop.Outlook.Application outlookApplication = GetApplicationObject(); my_Account = (Account)GetAccountForEmailAddress(outlookApplication, DefaultEmailAddress); newAppointment = (AppointmentItem)my_Account.Application.CreateItem(OlItemType.olAppointmentItem); recurrencePattern = newAppointment.GetRecurrencePattern(); recurrencePattern.RecurrenceType = OlRecurrenceType.olRecursYearly; recurrencePattern.PatternStartDate = dtStartDate; // new DateTime(2015, 01, 13); recurrencePattern.PatternEndDate = dtEndDate; // new DateTime(2015, 03, 20); recurrencePattern.StartTime = dtStartTime; recurrencePattern.EndTime = dtEndTime; recurrencePattern.MonthOfYear = dtStartDate.Month; recurrencePattern.DayOfMonth = dtStartDate.Day; recurrencePattern.NoEndDate = true; recurrencePattern.Duration = 1440; newAppointment.Categories = strCategory; newAppointment.Start = dtStartDate; newAppointment.End = dtEndDate; newAppointment.Location = strLocation; newAppointment.Body = strBody; newAppointment.AllDayEvent = blAllDayEvent; newAppointment.ReminderSet = blReminder; newAppointment.ReminderMinutesBeforeStart = intMinutes; newAppointment.Subject = strSubject; newAppointment.Recipients.Add(strTo); newAppointment.MeetingStatus = OlMeetingStatus.olMeeting; newAppointment.Save();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)