.NET:获取所有Outlook日历项 [英] .NET: Get all Outlook calendar items
问题描述
我如何从一个特定的日历的所有项目(具体日期)。 让我们说,例如,我有一个日历定期项目每周一晚上。当我要求所有的项目是这样的:
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).
我使用的是微软的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屋!