如何在Outlook 2013中的预约时间前24小时向与会者发送提醒(不是共享日历的所有者)?

时间:2017-03-29 21:37:49

标签: c# outlook calendar appointment

我在C#中创建一个Windows应用程序,用于在我的团队的共享日历中设置约会。我是日历的所有者。我已经编写了代码来设置约会,并在会议开始前24小时设置提醒时间。但不是向与会者发送提醒,而是向我发送提醒。我正在使用Microsoft.Office.Interop.Outlook。这是我使用的代码:

Outlook.Application oApp = new Outlook.Application();

// Get the NameSpace and Logon information.
Outlook.NameSpace oNS = oApp.GetNamespace("mapi");

// Get the Calendar folder.
Outlook.Recipient rcip = oNS.CreateRecipient("abc@domain.com");
Outlook.MAPIFolder oSharedCal = oNS.GetSharedDefaultFolder(rcip, Outlook.OlDefaultFolders.olFolderCalendar);
Outlook.MAPIFolder oShiftCal = oSharedCal.Folders["Sample"];
// Get the Items (Appointments) collection from the Calendar folder.
Outlook.Items oItems = oSharedCal.Items;
Outlook.AppointmentItem oAppt = (Outlook.AppointmentItem)oItems.Add();

// Set Appointment properties.
oAppt.Subject = Subject;
oAppt.Start = start;
oAppt.End = end;
oAppt.RequiredAttendees = email;
oAppt.ReminderMinutesBeforeStart = 24 * 60; 
oAppt.ReminderSet = true;
oAppt.BusyStatus = Outlook.OlBusyStatus.olFree;

//Show the item to pause.
oAppt.Save();
oAppt.Send();

任何人都可以帮我吗?

1 个答案:

答案 0 :(得分:0)

无法为与会者设置提醒,它们是您在创建日历中的约会副本。与会者可以在接受会议请求时为自己设置提醒。