A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

OL does not delete my items



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 19th 09, 04:02 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 8
Default 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
  #2  
Old January 19th 09, 04:48 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i delete items in Calendar? Please help. HelpDesk Outlook - Calandaring 7 July 20th 07 03:26 AM
Can't delete calendar items rentahubby Outlook - Calandaring 1 May 16th 06 03:22 PM
How to Really Delete Sent items? [email protected] Outlook - General Queries 5 May 2nd 06 06:59 AM
Can't delete items or move items in Outlook 2002 Garret Swayne Outlook - General Queries 2 April 14th 06 08:15 AM
Delete items from sent items box Selector007 Outlook - General Queries 1 February 13th 06 09:47 PM


All times are GMT +1. The time now is 08:24 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.