How to catch NewInspector event

  • Thread starter Thread starter cyan21
  • Start date Start date
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++
 
Implement the InspectorsEvents interface and register it with the Inspectors
collection. The InspectorsEvents interface has one method NewInspector.
 
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::olMailItem, &pDisp);
mail = pDisp;
mail->Display(v1);

hr = CloseItemAppEvents::DispEventAdvise((IDispatch*)mail);
hr = WriteItemAppEvents::DispEventAdvise((IDispatch*)mail);
 
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.
 
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) ?
 
Back
Top