How to catch NewInspector event

C

cyan21

hello,

I'd like to detect a new window, I know I have to trap NewInspector
event but I don't know how to do it.

I managed to trap ItemClose, ItemWrite, ItemAdd but I don't understand
the way to catch NewInspector.

thanks in advance

yann

nb : I program in C++
 
T

TC

Implement the InspectorsEvents interface and register it with the Inspectors
collection. The InspectorsEvents interface has one method NewInspector.
 
C

cyan21

ok I see there is a method NewInspector but how to trap it.
for instance, when I want to trap ItemClose or ItemWrite event, I
create a object then I pass in parameter in the DispEventAdvise method
my object

olapp->raw_CreateItem(Outlook::blush:lMailItem, &pDisp);
mail = pDisp;
mail->Display(v1);

hr = CloseItemAppEvents::DispEventAdvise((IDispatch*)mail);
hr = WriteItemAppEvents::DispEventAdvise((IDispatch*)mail);
 
T

TC

You register your InpectorsEvents interface with the Inspectors object. You
retrieve the Inspectors object from the Outlook Application object. It seems
like you need to spend sometime studying the Outlook Object Model. Try using
the Object Browser. It allows you to view the Outlook objects, their methods
and events. You can also browse the .tlh file.
 
C

cyan21

is it fired when a "confirming" box is displayed ( for example when you
made modification on an object and you close the window with the "X"
button) ?
 

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