B
BDC
I need to identify the currently selected instance of a recurring
appointment. The following code always returns the original AppointmentItem
not the recurrence.
Public Sub DisplayItemInfo()
' display the props of the current item
Dim myolApp As Outlook.Application
Dim myOlExplorer As Outlook.Explorer
Dim myOlSel As Outlook.Selection
Dim myOlItem
Dim myProp As Outlook.UserProperty
Set myolApp = Outlook.Application
Set myOlExplorer = myolApp.ActiveExplorer
Set myOlSel = myOlExplorer.Selection
For Each myOlItem In myOlSel
With myOlItem
Debug.Print
"________________________________________________________________________"
Debug.Print .Start & " - " & .End & ": " & vbTab & .Subject
Debug.Print " EntryID = " & .EntryID
Debug.Print " StoreID = " & myOlExplorer.CurrentFolder.StoreID
Debug.Print "MessageClass = " & .MessageClass
Debug.Print "IsRecurring = " & .IsRecurring
End With
Next myOlItem
End Sub
appointment. The following code always returns the original AppointmentItem
not the recurrence.
Public Sub DisplayItemInfo()
' display the props of the current item
Dim myolApp As Outlook.Application
Dim myOlExplorer As Outlook.Explorer
Dim myOlSel As Outlook.Selection
Dim myOlItem
Dim myProp As Outlook.UserProperty
Set myolApp = Outlook.Application
Set myOlExplorer = myolApp.ActiveExplorer
Set myOlSel = myOlExplorer.Selection
For Each myOlItem In myOlSel
With myOlItem
Debug.Print
"________________________________________________________________________"
Debug.Print .Start & " - " & .End & ": " & vbTab & .Subject
Debug.Print " EntryID = " & .EntryID
Debug.Print " StoreID = " & myOlExplorer.CurrentFolder.StoreID
Debug.Print "MessageClass = " & .MessageClass
Debug.Print "IsRecurring = " & .IsRecurring
End With
Next myOlItem
End Sub