D
deko
I need to loop through all future Outlook appointment items and populate a
table with the date and subject of each appointment. The problem is with
recurring apointments - how do I get the recurring dates?
If the appointment is NOT recurring, this works:
Dim ola As Outlook.AppointmentItem
For Each ola In olns.GetDefaultFolder(olFolderCalendar).Items
If ola.Start > Date Then
myDate = ola.Start
mySubject = ola.Subject
End If
But the above code will not return recurring appointments.
I've tried this, but no luck:
If ola.IsRecurring Then
Dim varItem As Variant
Dim apptRcrPat As Outlook.RecurrencePattern
Dim apptRcr As Outlook.AppointmentItem
Set apptRcrPat = ola.GetRecurrencePattern
For Each varItem In apptRcrPat
Debug.Print varItem
Next
End If
Suggestions welcome. Thanks in advance.
table with the date and subject of each appointment. The problem is with
recurring apointments - how do I get the recurring dates?
If the appointment is NOT recurring, this works:
Dim ola As Outlook.AppointmentItem
For Each ola In olns.GetDefaultFolder(olFolderCalendar).Items
If ola.Start > Date Then
myDate = ola.Start
mySubject = ola.Subject
End If
But the above code will not return recurring appointments.
I've tried this, but no luck:
If ola.IsRecurring Then
Dim varItem As Variant
Dim apptRcrPat As Outlook.RecurrencePattern
Dim apptRcr As Outlook.AppointmentItem
Set apptRcrPat = ola.GetRecurrencePattern
For Each varItem In apptRcrPat
Debug.Print varItem
Next
End If
Suggestions welcome. Thanks in advance.