G
Guest
I was using itemID but this did not work in all outlook clients
Any other way to do it
this is how i did it so far
Sub DeleteDelete(
Dim myOlApp, myNameSpace, Sel, objRecip, MyItem As Objec
Dim SavedEntryId,
Set myOlApp = CreateObject("Outlook.Application"
Set myNameSpace = myOlApp.GetNamespace("MAPI"
Set Sel = Application.ActiveExplorer.Selectio
For I = 1 To Sel.Coun
If Sel.Item(I).Class = olMail The
Set MyItem = Sel.Item(I
SavedEntryId = MyItem.EntryI
MyItem.Delete
Set MyItem = myNameSpace.GetItemFromID(SavedEntryId) ' <--- Run time error 8004010F, operation faile
MyItem.Delete
End I
Nex
End Sub
Any other way to do it
this is how i did it so far
Sub DeleteDelete(
Dim myOlApp, myNameSpace, Sel, objRecip, MyItem As Objec
Dim SavedEntryId,
Set myOlApp = CreateObject("Outlook.Application"
Set myNameSpace = myOlApp.GetNamespace("MAPI"
Set Sel = Application.ActiveExplorer.Selectio
For I = 1 To Sel.Coun
If Sel.Item(I).Class = olMail The
Set MyItem = Sel.Item(I
SavedEntryId = MyItem.EntryI
MyItem.Delete
Set MyItem = myNameSpace.GetItemFromID(SavedEntryId) ' <--- Run time error 8004010F, operation faile
MyItem.Delete
End I
Nex
End Sub