Delete outlook calendar appointment item permanently.

  • Thread starter Thread starter srinivasanprabakaran
  • Start date 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.
 
Trap ItemAdd on the Items collection of the Deleted Items folder and when
that fires delete the item from there.
 
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.
 
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.
 
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.
 
hye Ken,

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

Thanks in advance,
SrinivasanPrabakaran.
 
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);
 
Back
Top