View Single Post
  #2  
Old May 8th 09, 02:32 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default delete appointmentitem permanently using redemption

Make sure the item is saved so it has an EntryID, get the EntryID and use
that with an RDOSession object to call RDOSession.GetMessageFromID(). That
returns an RDOMail object, call that object's Delete() method.

' assume the Outlook appointment is oAppt:
If oAppt.Saved = False Then
oAppt.Save
End If

Dim id As String
id = oAppt.EntryID

Set oAppt = Nothing
Set oSafeAppt = Nothing

Set oRDO = CreateObject("Redemption.RDOSession")
oRDO.MAPIOBJECT = olApp.GetNameSpace("MAPI").MAPIOBJECT

Dim safMail As Redemption.RDOMail
Set safMail = oRDO.GetMessageFromID(id)
safMail.Delete


--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"sd" wrote in message
...
hello

Is there any way to delete appointmentItem permanently using
redemption?Redemption.SafeAppointmentItem doesn't have delete
method.please provide a code snippet if possible.


Thanks



Ads