Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Get all occurrences of recurring appointment

Geek News

Get all occurrences of recurring appointment
"JohnV[ at ]nn" <jmvannoy[ at ]gmail.com> 6/19/2007 8:05:26 PM
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

Re: Get all occurrences of recurring appointment
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 6/19/2007 10:18:21 PM
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

"JohnV[ at ]nn" <jmvannoy[ at ]gmail.com> wrote in message
news:1182283526.700862.259730[ at ]n2g2000hse.googlegroups.com...
[Quoted Text]
> 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
>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net