如何使用Redemption.dll将联系人添加到日历中?使用C#
我正在使用以下代码: Redemption.rdoappointment项目目标 Redemption.RDORecurrencePattern objRecurrence ObjPoint=(Redemption.RDOAppointmentItem)p_objDestFolder.Items.Add( p_objDestFolder.DefaultItemType) objAppointment.optionalAttenders=”Contact@yahoo.com"; ObjPoint.RequiredAttenders=”Contact@stack.com) objappoint.Save() 但上面的代码没有将联系人添加到Caledar中 有人能帮我吗 问候,如何使用Redemption.dll将联系人添加到日历中?使用C#,c#,outlook,C#,Outlook,我正在使用以下代码: Redemption.rdoappointment项目目标 Redemption.RDORecurrencePattern objRecurrence ObjPoint=(Redemption.RDOAppointmentItem)p_objDestFolder.Items.Add( p_objDestFolder.DefaultItemType) objAppointment.optionalAttenders=”Contact@yahoo.com"; ObjPoint.
Saggy您使用赎回的事实不应该有什么区别:
使用
AppointItem.Recipients.Add()
添加收件人。要将其设置为可选或必需(默认),请将收件人类型设置为
olRequired
或olOptional
(请参见Outlook宏编辑器中对象浏览器中的OlMeetingRecipientType
)
示例:Recipients.Item(1).Type=olRequired
收件人。添加(“foo@bar.com“”。Type=o可选
这是我当前用于安排约会的代码:
RDOSession session = new RDOSession();
session.Logon(System.Reflection.Missing.Value, System.Reflection.Missing.Value, false, true, System.Reflection.Missing.Value, false);
RDOFolder calendar = session.GetDefaultFolder(rdoDefaultFolders.olFolderCalendar);
RDOAppointmentItem oAppointment = (RDOAppointmentItem)calendar.Items.Add(rdoItemType.olAppointmentItem);
oAppointment.Subject = "This is a test subject";
oAppointment.Body = "This is a test body";
oAppointment.Start = DateTime.Now;
oAppointment.End = DateTime.Now.AddMinutes(15);
oAppointment.ReminderSet = true;
oAppointment.ReminderMinutesBeforeStart = 30;
oAppointment.Importance = (int)rdoImportance.olImportanceNormal;
oAppointment.BusyStatus = rdoBusyStatus.olBusy;
oAppointment.Save();
oAppointment = null;
calendar = null;
session.Logoff();
session = null;