RecurrencePattern.GetOccurrence() fails on patterns from recurringTasks

Not open for further replies.


I'm getting a

"Member not found. (Exception from HRESULT: 0x80020003


error when I try to get a particular occurrence of a recurring task.

The MSDN documentation implies that you can get an particular

occurrence of an appointment or task using the following technique

(expressed here is pseudocode):

Item recurringItem = NameSpace.GetItemFromId(entryId,storeId);

RecurrencePattern pattern = recurringItem.GetRecurrencePattern();

Item occurrence = pattern.GetOccurrence(date);

That approach works correctly w/ recurring appointments,

however, .GetOccurrence() fails when the item is a task.

I'm sure that there is a recurring task on 'date', b/c I can see the

task in Outlook. I'm aware of the fact that GetOccurrence() will throw

an exception if there is no occurrence on that date; that's not the

issue I'm having.

Thanks in advance.

Re: RecurrencePattern.GetOccurrence() fails on patterns from recurring Tasks

Recurring tasks don't work the same way as appointments. There is no master

task with a RecurrencePattern that lists all the individual tasks in its

Recurrences and Exceptions collections. Instead, each task created by the

recurrence pattern is an independent item. Therefore, you should be able to

use MAPIFolder.Items.Find to search by the specific date and other

information you know about the task.

Sue Mosher
Re: RecurrencePattern.GetOccurrence() fails on patterns from recurring Tasks

Actually on the low level, the recurrence info on tasks is almost exactly

the same as on appointments.

It is just OOM defines the return type of the

RecurrencePattern.GetOccurrence method (that object is shared by both

appointment and taks objects) as Outlook.AppointmentItem, which makes no

sense for tasks.

Dmitry Streblechenko (MVP)
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
S Identify weekend from daily RecurrencePattern Outlook VBA and Custom Forms 2
A Outlook 2010 VBA fails to launch Outlook VBA and Custom Forms 2
D Outlook 2003 Mail Fails Using Outlook 1
D Outlook 2010 account setup fails in particular domain Using Outlook 3
ChrisK2 Send email to fails: "The group advertising isn't set up to receive messages from..." Using Outlook 3
M Outlook 2013 fails to start -- missing WindowsCodecs.dll error Using Outlook 3
D in Outlook 2016 Trys & Fails to Send on Behalf of Itself Using accounts in Outlook 2
J VB6 Add-in fails to load in Outlook 16 - message useless Outlook VBA and Custom Forms 4
J Will BCC messages still deliver if TO address fails Outlook 2013 Using Outlook 3
A OL16 C2R attachment preview fails Using Outlook 8
I Copy email from folder to folder - FAILS Using Outlook 5
Z Outlook 2007, clicking email addresses fails to open Contact Using Outlook 0
G "Delay Delivery" Email fails to send if opened while in Outbox Using Outlook 4
T Outlook 2013 either fails to mark messages as read or marks them as read, then un-marks them. Using Outlook 1
jChambler setup of iCloud with Outlook 2007 fails Using Outlook 4
P Outlook 2010 fails to start after icloud update Using Outlook 3
Jennifer Murphy Distribution list fails after conversion to Unicode PST Using Outlook 2
E run script fails suddenly Using Outlook 3
D Outlook 2010 Fails to Send Messages To One Domain Using Outlook 6
F Email notification if notification email fails Using Outlook 1
F Google Desktop fails to index Outlook 2010 Using Outlook 3
T BCM Install fails Both w Off. Pro 2010 Beta & on reinstall Off.Pro BCM (Business Contact Manager) 5
T BCM 2007: Accounts creation or opening fails BCM (Business Contact Manager) 1
O Scheduled Task Fails running Code to send Outlook Mail from Excel. Outlook VBA and Custom Forms 9
J outlook fails to start then problem with business contact manager BCM (Business Contact Manager) 1
R outlook 2007 itemadd event handler fails to run Outlook VBA and Custom Forms 2
S BCM install fails at SQL install BCM (Business Contact Manager) 1
B Marketing Campaign BCM 2007 – Word 2007 Merge Fails BCM (Business Contact Manager) 1
T MOA/BCM Integration fails BCM (Business Contact Manager) 2
W BCM and Outlook problem ( BCM fails to start) BCM (Business Contact Manager) 1
B Outlook fails - error says execute scanpst.exe but can't find it Using Outlook 8
T _MailItem::Move fails Outlook VBA and Custom Forms 2
T folder->get_Store fails Outlook VBA and Custom Forms 7
A Eseutil File Dump fails in the path to the file is too long... Exchange Server Administration 2
A After update to SP2 (office 2007) Launching a campaign fails BCM (Business Contact Manager) 3
P Redemption Send EMail fails Outlook VBA and Custom Forms 4
U BeforeItemMove fails with Exchange Shared Mailbox Calendar Outlook VBA and Custom Forms 3
H fails to install from cd BCM (Business Contact Manager) 1

Similar threads