![]() |
OL does not delete my items
Hello,
I currently do the following after pressing send: - create a new e-mail - change content from original e-mail and copy to new e-mail - send new e-mail - delete original e-mail The deletion is the problem. I do it the following way (symbolic): 1. Item.Delete 2. Now I remember the ItemID 3. Later in a Timer event I continuously try to delete such mails from basket: Set MyItem = ConnectClass.VBInstance.Session.GetItemFromID(Item ID) MyItem.Delete On most standalone OL systems, the mail is removed completely. That is ok. But on some systems (mostly OL 2007 connected to Exchange), the e- mail still remains in basket even after calling MyItem.Delete multiple times. Now the most confusing behaviour: If I double-click open one of those items in the basket, then close it, it will get removed by ghost hand. I have Redemption Objects available (if this will be helpfull). How to delete for sure? Volker |
OL does not delete my items
When a PST file is used the EntryID does not change when an item is deleted
or moved to another folder in that PST file. When an Exchange mailbox is used the EntryID does get changed when an item is moved or deleted. That's specific to the store provider and cannot be changed. That's what causes your code to fail when used against an Exchange mailbox. You can handle ItemAdd on the Deleted Items folder and get the subject of your object before calling Delete() on it, then match the subject when the ItemAdd event fires. That will work for you whether a PST file is used or an Exchange mailbox. If you want to use RDO objects on this you can set up an ItemRemove handler for the RDOItems collection of your folder. You'd get the PR_INSTANCE_KEY values for your items before deleting them and then compare that property with the item passed to you in ItemAdd() in the RDOItems collection for the Deleted Items folder to verify it's the same item. -- 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 wrote in message ... Hello, I currently do the following after pressing send: - create a new e-mail - change content from original e-mail and copy to new e-mail - send new e-mail - delete original e-mail The deletion is the problem. I do it the following way (symbolic): 1. Item.Delete 2. Now I remember the ItemID 3. Later in a Timer event I continuously try to delete such mails from basket: Set MyItem = ConnectClass.VBInstance.Session.GetItemFromID(Item ID) MyItem.Delete On most standalone OL systems, the mail is removed completely. That is ok. But on some systems (mostly OL 2007 connected to Exchange), the e- mail still remains in basket even after calling MyItem.Delete multiple times. Now the most confusing behaviour: If I double-click open one of those items in the basket, then close it, it will get removed by ghost hand. I have Redemption Objects available (if this will be helpfull). How to delete for sure? Volker |
All times are GMT +1. The time now is 12:25 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com