item open event

D

dibyaranjan rath

In my outlook addin New inspector event (new inspector created) and
MailItem_Open event called when a mail item is open from outlook or from
hard drive. Is there any other event(like in explorer.application,folder)
which is called before these 2 events and which tells the difference from
where the mailitem is open (outlook or hard drive).
 
D

dibyaranjan rath

Ok. When open mail item from hard disk then outlook place it in active
inspector and shows Inbox as its parent folder. Can we capture these events
when it attach to inspector.
 
K

Ken Slovak - [MVP - Outlook]

You can capture NewInspector(), unless the item was opened by using Send To
in order to attach a file to a new email. In that case NewInspector()
doesn't even fire.

If an item is changed in an existing Inspector you can handle the
item.Open() event. However, I don't think that's what's actually happening,
I think a new Inspector is opened and the previous one is closed.

If the item is actually added to Inbox you could handle Inbox.Items.Add().
 
D

dibyaranjan rath

I tried with Inbox.Items.Add(). Sometime Inbox.Items.Add() is fire before
onnewinspector & inspector_activate() when open mailitem from hard disk.
But sometime it's fired after onnewinspector & inspector_activate() events,
for this case if i check the parent item name for mailitem in onnewinspector
then it shows Inbox while Inbox.Items.Add() is not yet fired.
So due to this i cant find the difference between mail open from
outlook/hard drive
 
K

Ken Slovak - [MVP - Outlook]

That's what's available, if it doesn't do what you want I don't know of any
other ways.
 

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