Get all occurrences of recurring appointment

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
 
D

Dmitry Streblechenko

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top