通过outlook约会进行迭代

通过outlook约会进行迭代,outlook,Outlook,我知道如何在Outlook中迭代非定期约会 我的问题是,如何迭代Outlook约会,包括定期约会 谢谢。如果您愿意使用第三方库,我建议您使用“赎回”库()。此库具有使用GetActivities Fortimerange方法的有用的RDOFolder2接口 在这里,您可以找到有关此界面使用的更多信息: () 如果您不想使用第三方库并且需要坚持使用Outlook API,诀窍是在迭代约会之前将includeCurrences标志设置为true。以下文章应提供有关如何做到这一点的足够信息: ()实际

我知道如何在Outlook中迭代非定期约会

我的问题是,如何迭代Outlook约会,包括定期约会


谢谢。

如果您愿意使用第三方库,我建议您使用“赎回”库()。此库具有使用GetActivities Fortimerange方法的有用的RDOFolder2接口

在这里,您可以找到有关此界面使用的更多信息: ()

如果您不想使用第三方库并且需要坚持使用Outlook API,诀窍是在迭代约会之前将includeCurrences标志设置为true。以下文章应提供有关如何做到这一点的足够信息:
()

实际上没有必要使用第三方工具。有一个选项IncludeCurrences可以解决这一问题:

    Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set MyFolder = myNameSpace.GetDefaultFolder(olFolderCalendar)

Set oItems = MyFolder.Items

' Restrict Date
strFilter = "[Start] >= " + "'"  + ourStart + "'"
Set oItems = oItems.Restrict(strFilter)

strFilter = "[End] <= " + "'"  + ourEnd + "'"
Set oItems = oItems.Restrict(strFilter)

' Restrict Category
strFilter = "[Categories] = " + "'"  + ourCategory + "'"
Set oItems = oItems.Restrict(strFilter)

oItems.Sort "[Start]"

' We want recurring, too (http://www.pcreview.co.uk/forums/get-recurring-appointment-dates-vba-t799214.html)
oItems.IncludeRecurrences = True
Set myNameSpace=myOlApp.GetNamespace(“MAPI”)
设置MyFolder=myNameSpace.GetDefaultFolder(olFolderCalendar)
设置oItems=MyFolder.Items
“限制日期
strFilter=“[Start]>=”+““+ourStart+””
设置oItems=oItems.Restrict(strFilter)

strFilter=“[End]似乎是一个合理的问题,不确定为什么会投反对票。语法和拼写都很糟糕,但我猜他不是母语人士。为了清晰起见,请编辑。