即时通讯在用户日历中插入约会, 我可以用我自己的方式轻松插入使用Microsoft.Office.Interop.Outlook.Application(下), 然后添加用户作为收件人,但如果我不想添加自己,如果我只想添加其他人,该怎么办?这可以用类似的方式完成吗?使用c#插入outlook预约,asp.net
感谢
Microsoft.Office.Interop.Outlook.Application app = null;
Microsoft.Office.Interop.Outlook.AppointmentItem appt = null;
app = new Microsoft.Office.Interop.Outlook.Application();
appt = (Microsoft.Office.Interop.Outlook.AppointmentItem)app.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olAppointmentItem);
appt.Subject = "Meeting ";
appt.Body = "Test";
appt.Location = "a room";
appt.Start = Convert.ToDateTime("08/08/2012 05:00:00 PM");
appt.Recipients.Add("[email protected]");
appt.End = Convert.ToDateTime("08/08/2012 6:00:00 PM");
appt.ReminderSet = true;
appt.ReminderMinutesBeforeStart = 15;
appt.Importance = Microsoft.Office.Interop.Outlook.OlImportance.olImportanceHigh;
appt.BusyStatus = Microsoft.Office.Interop.Outlook.OlBusyStatus.olBusy;
appt.Save();
你有没有在Outlook中试过这个?我相信您在创建约会时会自动成为与会者。你不会在Outlook中有一个选项来删除你的名字。如果Outlook不允许,Interop将不会有任何选项。 – 2012-08-06 12:04:25