Re: The timeless, never-ending question



"seacuke" wrote:

> You know, in thinking about it, I am wondering how important it is that
> I don't seem to have access to a close event in Outlook.Explorer or
> Outlook.Inspector?

For both Inspectors and Explorers, you need to cast them to InspectorClasses
and ExplorerClasses respectively in order to get at their Close events:

// inside your Connect class

((ExplorerClass)
applicationObject.ActiveExplorer()).ExplorerEvents_10_Event_Close += ...

// inside your wrapper class for the item/inspector

((InspectorClass) item.GetInspector).InspectorEvents_10_Event_Close += ...

Hope this helps (and is not too late),

-Aaron
.



Relevant Pages

  • Outlook events cease to fire during a session
    ... outlook objects (inspectors, explorers, application, items, item, ... public static void RegisterExplorerEventHandlers ...
    (microsoft.public.outlook.program_forms)
  • Re: anything wrong with this code?
    ... I don't have much error handling code. ... I stepped the code, found the explorers have 1 item left, inspectors are ... > Unhandled errors also cause Outlook to remain in memory. ...
    (microsoft.public.outlook.program_addins)
  • Re: Application.ActiveInspector.CommandBars.FindControl(, 360) Type Mismatch
    ... I think you're confusing Inspectors and Explorers. ... Inspectors are the objects used to display opened Outlook items. ... In any search using FindControl I usually would enable the recursive setting so the search digs down into each CommandBar object into all the top level CommandBarControl objects as well as lower level ones. ...
    (microsoft.public.outlook.program_vba)
  • Re: _Explorers.NewExplorer event not firing for every new explorer
    ... Is the _Explorers object valid when you run that code? ... public void OnStartupComplete(ref System.Array custom) ... // get notified for new inspectors ...
    (microsoft.public.office.developer.com.add_ins)