outlook共享日历指定范围之间的重复项目

时间:2013-05-03 11:51:27

标签: vba outlook outlook-vba

以下是我的代码,我可以在其中打印共享日历文件夹中的重复项目数。现在我想从用户说出SDate和EDate的日期范围,并想要检查指定日期范围之间的重复以及正常的aapointment项目并打印它。我的定期项目从2010年1月1日开始,它没有结束,它每周五都会重复。我想检查特定项目是否在我的日期范围之间重复,如果是,则要打印其详细信息。

Sub item()

Dim objExpCal As Outlook.Explorer
Dim objNavMod As Outlook.CalendarModule
Dim objNavGroup As Outlook.NavigationGroup
Dim objNavFolder As Outlook.NavigationFolder
Dim objFolder As Outlook.Folder

Set objOL = Application
Set objNS = objOL.Session
Set colExpl = objOL.Explorers

Set objExpCal = _
objNS.GetDefaultFolder(olFolderCalendar).GetExplorer

Set objNavMod = objExpCal.NavigationPane.Modules. _
GetNavigationModule(olModuleCalendar)

Set objNavGroup = objNavMod.NavigationGroups. _
GetDefaultNavigationGroup(olPeopleFoldersGroup)


For Each objNavFolder In objNavGroup.NavigationFolders
    Set objFolder = objNavFolder.Folder
    Set oItems = objFolder.Items
    Set colFilteredItems = oItems.Restrict("[IsRecurring] = TRUE")

    For Each objItem In colFilteredItems

        Debug.Print objItem
        Set objpattern = objItem.GetRecurrencePattern

    Next

Next

End Sub

1 个答案:

答案 0 :(得分:0)