Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / June 2005

Tip: Looking for answers? Try searching our database.

How to catch NewInspector event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cyan21 - 27 Jun 2005 20:54 GMT
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++
TC - 28 Jun 2005 01:27 GMT
Implement the InspectorsEvents interface and register it with the Inspectors
collection. The InspectorsEvents interface has one method NewInspector.

> hello,
>
[quoted text clipped - 9 lines]
>
> nb : I program in C++
cyan21 - 28 Jun 2005 08:32 GMT
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);
TC - 28 Jun 2005 14:48 GMT
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.

> 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
[quoted text clipped - 7 lines]
> hr = CloseItemAppEvents::DispEventAdvise((IDispatch*)mail);
> hr = WriteItemAppEvents::DispEventAdvise((IDispatch*)mail);
cyan21 - 29 Jun 2005 13:11 GMT
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) ?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.