.NET:获取所有 Outlook 日历项目 [英] .NET: Get all Outlook calendar items

查看:25
本文介绍了.NET:获取所有 Outlook 日历项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从特定日历(针对特定日期)获取所有项目.比如说,我有一个日历,每个星期一晚上都有一个重复项目.当我请求这样的所有项目时:

How can I get all items from a specific calendar (for a specific date). Lets say for instance that I have a calendar with a recurring item every Monday evening. When I request all items like this:

CalendarItems = CalendarFolder.Items;
CalendarItems.IncludeRecurrences = true;

我只得到 1 个项目...

I only get 1 item...

是否有一种简单的方法可以从日历中获取所有项目(主要项目 + 派生项目)?在我的特定情况下,可以设置日期限制,但仅获取所有项目会很酷(我的重复项目本身有时间限制).

Is there an easy way to get all items (main item + derived items) from a calendar? In my specific situation it can be possible to set a date limit but it would be cool just to get all items (my recurring items are time limited themselves).

我使用的是 Microsoft Outlook 12 对象库 (Microsoft.Office.Interop.Outlook).

推荐答案

我相信您必须限制或查找才能获得定期约会,否则 Outlook 不会扩展它们.此外,您必须设置 IncludeRecurrences 之前按开始排序.

I believe that you must Restrict or Find in order to get recurring appointments, otherwise Outlook won't expand them. Also, you must Sort by Start before setting IncludeRecurrences.

这篇关于.NET:获取所有 Outlook 日历项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆