Get all occurrences of recurring appointment

  • Thread starter Thread starter JohnV@nn
  • Start date Start date
J

JohnV@nn

Given a master appointment item, is there a way to use Find or
Restrict methods on the Items collection to get all the occurrences?
I was going to do something like this:

calendaritems.Sort("Start")
calendaritems.IncludeRecurrences = True
calendaritems.Restrict("[EntryID]=123")

But I discovered you can't use EntryID with Restrict. Does anyone
know a way to use filtering or restricting to get the occurrences? Or
some other reliable way?

Thanks,
John
 
Expanding recurrences only makes sense for a time range - imagine what
happens when you try to expand the recurrence pattern for an appointment
with no end date.
You can:
1. Restrict on the Subject property and then filter out items with wrong
entry ids (
2. Use RecurrencePattern.GetOccurrence, but you will need to provide the
recurrence date, and you will needto explicitly calculate it based on the
recurrence pattern

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top