qq_15618929 2018-08-29 02:16 采纳率: 0%
浏览 1790
已结题

OutLook怎么获取日历中的定期约会呢?

Microsoft.Office.Interop.Outlook;

             Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application();
            Microsoft.Office.Interop.Outlook.NameSpace oNS = oApp.GetNamespace("MAPI");//mapi
            Microsoft.Office.Interop.Outlook.ApplicationClass olObj = new Microsoft.Office.Interop.Outlook.ApplicationClass();//Get the MAPI namespace 
            Microsoft.Office.Interop.Outlook.Recipient rec = olObj.GetNamespace("MAPI").CreateRecipient("jiangpeng0623@outlook.com");//"xu, dan"是共享的会议室calendar的名称。
            Microsoft.Office.Interop.Outlook.MAPIFolder oCalendar = oNS.GetSharedDefaultFolder(rec, Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderCalendar);
            Microsoft.Office.Interop.Outlook.Items oItems = oCalendar.Items;
            Microsoft.Office.Interop.Outlook.AppointmentItem oAppt = (Microsoft.Office.Interop.Outlook.AppointmentItem)oItems.GetFirst();
            string str = "";
            for (int i = 1; i <= oItems.Count; i++)
            // Show some common properties.z
            {
                str += str + "Subject:" + oAppt.Subject + "\r\n";
                str += str + "Organizer:" + oAppt.Organizer + "\r\n";
                str += str + "Start:" + oAppt.Start.ToString() + "\r\n";
                str += str + "End:" + oAppt.End.ToString() + "\r\n";
                str += str + "Location:" + oAppt.Location + "\r\n";
                str += str + "Recurring:" + oAppt.IsRecurring + "\r\t------------------------" + i.ToString();
                oAppt = (Microsoft.Office.Interop.Outlook.AppointmentItem)oItems.GetNext();
            }
            Console.WriteLine(str);
            Console.ReadLine();

这个获取的OutLook中普通的约会,如果是定期约会的话,就没办法获取了,求解?

  • 写回答

1条回答 默认 最新

  • 弹梦麟天 2018-08-30 01:45
    关注

    第一步
    第二步

    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?