Identifying messages marked for deletion in Outlook

B

Bill

I have been working with Outlook automation. My first experiments
were using a POP3 account and recently I have been trying to work
with an IMAP account. With IMAP I have found that deletion leaves
items in folders. Outlook displays them with strikethrough. However,
in the automation interface I have been unable to distinguish items
that have been deleted (showing with strikethrough) from any other
mail item. Does anyone know how to make this distinction?

Thanks
 
W

Wei-Dong XU [MSFT]

Hi Bill,

Currently I am finding one support professional for you on this issue. If
any update, we will reply here at the first time.

Best Regards,
Wei-Dong XU
Microsoft Product Support Services
This posting is provided "AS IS" with no warranties, and confers no rights.
It is my pleasure to be of assistance.
 
P

Peter Huang [MSFT]

Hi Bill,

Based on my research, if we presss delete when the the message is in other
folder than the "deleted items" folder, the mail items will be moved into
the "deleted items" folder and if we delete it from the "deleted items"
folde, the item will be deleted permanently.

If I have any misunderstanding, please feel free to post here.

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
B

Bill

Hi Peter,

This is my second attempt to reply. I think I did something wrong and lost
the
last version. If it comes through twice, sorry.

Deletions occur as you describe when using a POP3 server.
When using IMAP, they occur differently. When something is
deleted (from inbox - say) it remains in the box and visible,
just displayed with strikethrough. If you explicitly move an
item to a 'deleted items' folder - either manually or
programmatically Outlook copies the item to the new folder and
leaves the original in the source folder (also displayed with
strikethrough). Items can be finally deleted by selecting
'Purge Deleted Messages' from the Edit menu. So, it seems
that items can exist in a 'Marked for Deletion' state. My
problem is to programmatically distinguish these from other
mail messages. For a while I thought that this distinction
might be inextricably internal to Outlook in some way, but I have since
tried using two computers, both logged in to the same IMAP
server and observed that an item 'deleted' on one machine
soon appears 'marked for deletion' on the other. There is
a RemoteStatus property on mail messages which includes
'marked for deletion' as one of its enumeration values. However,
I have always found this property to have the value zero.

I believe that Outlook Express and Outlook are different in their
handling of delete on IMAP folders. My query relates to Outlook.

I have found some discussion about the implementation of delete
with IMAP, and even macro code for changing it to the form you
describe. It can be accessed at
http://www.outlookcode.com/codedetail.aspx?id=427 which I
reached as the first hit on the Google query "site:eek:utlookcode.com purge
imap"
I don't like the way it works - invoking the Purge Deleted Messages
automatically by burrowing though the commandbars structure.
Is there no way of performing 'Purge Deleted Messages' in a better
way through the automation interface? Nonetheless I have done
a version in C++ to execute the purge. It is only convenient to use
if the warning on permanent deletion is switched off, which I
regard as poor practice. If all else fails it provides me with
a work around, to get my program functioning. I would much prefer
to be able to just ignore the messages that were marked for deletion,
ideally using a folder items restrict operation.

Cheers
Bill
 
P

Peter Huang [MSFT]

Hi,

Currently I am researching the issue and we will reply here with more
information as soon as possible.
If you have any more concerns on it, please feel free to post here.

Thanks for your understanding!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Peter Huang [MSFT]

Hi

Based on my research through the Outlook Object Modal and the IMAP schema,
there is no such property for this purpose.
I think that is not exposed by the outlook Object Modal, because Outlook is
mainly for MAPI(exchange), so the default behavior of MAPI mailitem is that
it will be moved to the deleted folder after deleted.

If you have any concern, I think you may try submit a feedback in the link
below.
http://office.microsoft.com/en-us/suggestions.aspx?Sitename=0&Type=2


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top