Friend
Sub
EnumerateDefaultAppointmentsAndDoSomethingSillyThatIllustratesAPoint(calendarType
As
String
)
Dim
myOutlookApp
As
Object
Dim
myNameSpace
As
Outlook.
Namespace
Dim
myFolder
As
Outlook.Folder
Dim
calendar
As
Outlook.Folder
Dim
calendarItems
As
Outlook.Items
Dim
calendarItem
As
Object
Dim
A
As
AppointmentItem
Dim
myMtg
As
Outlook.MeetingItem
Set
myOutlookApp = CreateObject(
"Outlook.Application"
)
Set
myNameSpace = myOutlookApp.GetNamespace(
"MAPI"
)
Set
calendar = myNameSpace.GetDefaultFolder(olFolderDeletedItems)
Set
calendarItems = calendar.Items.Restrict(
"[MessageClass] = 'IPM.Schedule.Meeting.Request'"
)
For
olItemsCount = 1
To
calendarItems.Count
Set
calendarItem = calendarItems.Item(olItemsCount)
If
calendarItem.MessageClass =
"IPM.Schedule.Meeting.Request"
Then
Set
A = calendarItem.GetAssociatedAppointment(
False
)
Debug.Print (
"A.Start "
& A.Start)
Else
Debug.Print (
"Meeting.Request NO"
)
End
If
Next
End
Sub