Sub
Kalender()
Dim
objModule
As
CalendarModule
Dim
objGroup
As
NavigationGroup
Dim
objFolder
As
NavigationFolder
Dim
intCounter
As
Integer
On
Error
GoTo
ErrRoutine
Set
objPane = Application.ActiveExplorer.NavigationPane
Set
objModule = (olModuleCalendar)
For
Each
objGroup
In
objModule.NavigationGroups
MsgBox objGroup.Name
For
Each
objFolder
In
objGroup.NavigationFolders
MsgBox objFolder.DisplayName
If
objFolder.IsSelected
Then
intCounter = intCounter + 1
End
If
Next
Next
MsgBox
"There are "
& intCounter &
" selected calendars in the Calendar module."
EndRoutine:
On
Error
GoTo
0
Set
objFolder =
Nothing
Set
objGroup =
Nothing
Set
objModule =
Nothing
Set
objPane =
Nothing
intCounter = 0
Exit
Sub
ErrRoutine:
MsgBox Err.Number &
" - "
& Err.Description, _
vbOKOnly
Or
vbCritical, _
"EnumerateActiveCalendarFolders"
End
Sub