Delete outlook calendar appointment item permanently.

  • Thread starter srinivasanprabakaran
  • Start date
S

srinivasanprabakaran

I am developing an application using C#.net shared add-in.
It is intended to delete outlook appointment items permanently.
I am using _AppointmentItem object to delete the appointment from the
calendar.
while i am doing this the deleted appointment item is moved to the
Deleted items folder.
But i want to delete the appointment item permanently ie it should not
be moved to the deleted item folder instead it must be deleted
permanently.
 
K

Ken Slovak - [MVP - Outlook]

Trap ItemAdd on the Items collection of the Deleted Items folder and when
that fires delete the item from there.
 
S

Seenu

Hey thanks,
i am trying that.
But still i would like to know if there is any way to delete the appointment
items directly from the folder with out moving it.
and if so--
Can you tell me which object to use, for this kind of deletion.

Thanks in advance
SrinivasanPrabakaran.
 
S

Seenu

Hey Ken,
In the last post i told you what can be done.

The real requirement is to delete an appointment item with out firing the
delete event.
Can it be done ?
if so, how?
if not, why?

Thanks in advance,
SrinivasanPrabakaran.
 
K

Ken Slovak - [MVP - Outlook]

You can hard delete an item to avoid the Deleted Items folder (like
Shift+Delete in the UI), but not with the Outlook object model. You need to
use a different API if you want to do that. Some API's that can be used for
that are CDO 1.21 or Extended MAPI (not supported for managed code and
Extended MAPI is C++ or Delphi code only) or a 3rd party library such as
Redemption (www.dimastr.com/redemption). I use Redemption for things like
that myself.
 
S

Seenu

hye Ken,

I got Redemption now.
can you tell which object to use for deleting that item.

Thanks in advance,
SrinivasanPrabakaran.
 
K

Ken Slovak - [MVP - Outlook]

There are a few ways to do it. One is to use the SafeMailItem object:

Redemption.SafeMailItem oMail = new Redemption.SafeMailItem;
oMail.Item = myItem; // myItem is the Outlook item
oMail.Delete(missing);
 

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