Delete recurring appointment with MAPI DeleteMessages()?

E

Eric

Whenever I try and delete a recurring appointment item using
IMAPIFolder::DeleteMessages() it fails with this error:

MAPI_W_PARTIAL_COMPLETION

The item is not deleted, and none of the ocurrences are deleted
either. I'm just trying to delete the entire item. I am able to use
the same code to delete any other item, just not recurring appointment
items. Do I need to do something special to delete them, maybe remove
the IsRecurring (whatever MAPI property it maps to) flag first?

I notice I am able to delete these items using Outlook Spy's
IMAPIFolder GUI. I view the "Contents Table" tab and then click the
"delete" button, and it removes it without any errors. Maybe I'll try
MDBView also since that lets me get to a bit lower level... If anyone
has a "tested" (or documented) answer that would be appreciated
though, and safer than me just trying something new.
 
D

Dmitry Streblechenko \(MVP\)

Make sure there are no outstanding references to the appointment or any of
its subobjects (attachments, etc).

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

Eric

Thanks, in this case it ended up being that I was using PR_RECORD_KEY
by mistake, instead of PR_ENTRYID, to try and delete the item. With
Exchange folders those two keys are very similar, and it slipped past
me in the debugger, until I switched over to a non-exchange folder and
noticed what I thought was the entryid was only 4 bytes long =)
 

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