Trapping open mail item event

J

John_S

Hi

I am new to creating ol2003 add-in using vb2008. Is there a code example of
how to trap event when user opens a mail item in OL so I can choose to either
allow user opening of the item or give other options as appropriate?

Many Thanks

Regards
 
K

Ken Slovak - [MVP - Outlook]

That would be handling the NewInspector() event of the Inspectors
collection. If you handle that and then set up an event handler for the
Open() event on the item (Inspector.CurrentItem) you can also handle the
item.Open() event.

It's hard to recommend any specific code example since you never mentioned
what language you're using, or whether it's a shared addin or a VSTO addin,
but take a look at the addin information at www.outlookcode.com and you'll
find examples for all those variations.
 

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