Why I get a copy of a message in Inbox every time I open the Item from outside Outlook?

  • Thread starter Thread starter dimos cahtzipanteliadis
  • Start date Start date
D

dimos cahtzipanteliadis

Hi guys,

I have written a COM add-in for Outlook and have the folowing problem. I
use the the objInspectors_NewInspector event to check for the class of
the item and respod accordingly. It wirks fine EXCEPT when you move an
emai to outside Outlook, let say the Desctop and then you try to open
it. When you double click on the item, the email opens but at the same
time a copy of this email appears in Outlook Inbox!. This happens every
time, so if you open the Email (which is on your desktop) many times you
get many copies in the inbox :)

Some code:

Public Sub objInspectors_NewInspector(ByVal Inspector As Inspector)

Dim oCurrentItem As Object

Set oCurrentItem = Inspector.CurrentItem

'The next Line couses the email to appear in Inbox i.e.
'i can SET oCurrentItem = Inspector.CurrentItem but when
'I try to use .MessageClass i get a copy in my inbox!!!

If oCurrentItem.FormDescription.MessageClass = "IPM.Note.sent"


Thanks in advance
Dimos
 
That's how Outlook opens the MSG files - it creates a temporary message and
copies the MSG file contents to it.
Do you by any chance explicitly save the message?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top