A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Explorer' Close event not fired



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 28th 07, 03:29 PM posted to microsoft.public.outlook.program_addins
j
external usenet poster
 
Posts: 109
Default Explorer' Close event not fired

Hi All,

I have Outtlook Addin (C# 2.0, VSTO 2005, Outlook 2003),

i subscribed to close event:

explorerEvents.Close += new
Outlook.ExplorerEvents_10_CloseEventHandler(OnExpl orerClose);

but i never get there, why???

Only if i open another explorer (right click on folder-- Open in new
folder), and close it , then i get the close event fired, but when i
have only one explorer (main explorer) it's seem to be never fired.



P.S. I also susbscribe to FolderSwitch and SelectionChange explorer
events , they works fine.

Any suggestions??

  #2  
Old March 28th 07, 08:51 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Explorer' Close event not fired

It sounds like you're not subscribing to the correct Explorer's events and
that you're not using a wrapper collection for open Explorers. If you were
you wouldn't get Close on the first Explorer after opening a second
Explorer.

Are you getting ActiveExplorer and subscribing to that in the Startup event
handler in your VSTO addin?

FWIW I do get all Explorer events including on the first Explorer and
separate events in my Explorer wrappers for each Explorer event I subscribe
to including Close().

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"j" wrote in message
oups.com...
Hi All,

I have Outtlook Addin (C# 2.0, VSTO 2005, Outlook 2003),

i subscribed to close event:

explorerEvents.Close += new
Outlook.ExplorerEvents_10_CloseEventHandler(OnExpl orerClose);

but i never get there, why???

Only if i open another explorer (right click on folder-- Open in new
folder), and close it , then i get the close event fired, but when i
have only one explorer (main explorer) it's seem to be never fired.



P.S. I also susbscribe to FolderSwitch and SelectionChange explorer
events , they works fine.

Any suggestions??


  #3  
Old March 29th 07, 11:49 AM posted to microsoft.public.outlook.program_addins
j
external usenet poster
 
Posts: 109
Default Explorer' Close event not fired

Thanks,


It sounds like you're not subscribing to the correct Explorer's events and

but also i subscribed to FolderSwitch, and SelectionChange events, and
they fires well.

that you're not using a wrapper collection for open Explorers. If you were
you wouldn't get Close on the first Explorer after opening a second
Explorer.

Sorry probably i didn't explain right my problem, but if open another
explorer (NewWindow) on this just opened explorer
on closing it teh Close event will fire. On main explorer (explorer
that i get when Outlook is starts) i never get close event.


Are you getting ActiveExplorer and subscribing to that in the Startup event
handler in your VSTO addin?

Yes that exactly what i'm doing.



Any other suggestions??, Things that i should check??


Thanks in Advance.

  #4  
Old March 29th 07, 03:11 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Explorer' Close event not fired

Not offhand. Post the parts of the code you're using to set up your Explorer
events handlers. Maybe we'll see something.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"j" wrote in message
oups.com...
Thanks,


It sounds like you're not subscribing to the correct Explorer's events
and

but also i subscribed to FolderSwitch, and SelectionChange events, and
they fires well.

that you're not using a wrapper collection for open Explorers. If you
were
you wouldn't get Close on the first Explorer after opening a second
Explorer.

Sorry probably i didn't explain right my problem, but if open another
explorer (NewWindow) on this just opened explorer
on closing it teh Close event will fire. On main explorer (explorer
that i get when Outlook is starts) i never get close event.


Are you getting ActiveExplorer and subscribing to that in the Startup
event
handler in your VSTO addin?

Yes that exactly what i'm doing.



Any other suggestions??, Things that i should check??


Thanks in Advance.


  #5  
Old March 29th 07, 03:38 PM posted to microsoft.public.outlook.program_addins
j
external usenet poster
 
Posts: 109
Default Explorer' Close event not fired


Thanks,

outlookExplorer is hold reference to Explorer

Outlook.ExplorerEvents_10_Event explorerEvents =
(Outlook.ExplorerEvents_10_Event)outlookExplorer ;

explorerEvents.Close += new
Outlook.ExplorerEvents_10_CloseEventHandler(OnExpl orerClose);
explorerEvents.FolderSwitch += new
Outlook.ExplorerEvents_10_FolderSwitchEventHandler (explorerEvents_FolderSwitch);
explorerEvents.SelectionChange += new
Outlook.ExplorerEvents_10_SelectionChangeEventHand ler(explorerEvents_SelectionChange);


thats All, tnx

  #6  
Old March 29th 07, 03:48 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Explorer' Close event not fired

And this is called in your Startup() event handler? And outlookExplorer is
declared at class level and not in the procedure? What you show looks OK to
me.

I usually test for something like this:

if(Outlook.ActiveExplorer() != null)
{
outlookExplorer = Outlook.ActiveExplorer();

// then I add the Explorer events
}

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"j" wrote in message
oups.com...

Thanks,

outlookExplorer is hold reference to Explorer

Outlook.ExplorerEvents_10_Event explorerEvents =
(Outlook.ExplorerEvents_10_Event)outlookExplorer ;

explorerEvents.Close += new
Outlook.ExplorerEvents_10_CloseEventHandler(OnExpl orerClose);
explorerEvents.FolderSwitch += new
Outlook.ExplorerEvents_10_FolderSwitchEventHandler (explorerEvents_FolderSwitch);
explorerEvents.SelectionChange += new
Outlook.ExplorerEvents_10_SelectionChangeEventHand ler(explorerEvents_SelectionChange);


thats All, tnx


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inspector Close Event is fired when spell checking is canceled. Arcady Outlook and VBA 6 December 28th 06 03:38 PM
Explorer onOpen event BartH_NL Outlook and VBA 4 November 21st 06 09:50 AM
What event gets fired when i show/hide my outlook toolbar Gautam Outlook and VBA 1 July 12th 06 03:21 PM
Trigger event on explorer right click (unselected item)? james Add-ins for Outlook 5 February 22nd 06 10:12 PM
Help! Inspector.Close is fired before Inspector.Activate handler finishes Sergey Anchipolevsky Add-ins for Outlook 8 February 9th 06 10:51 AM


All times are GMT +1. The time now is 08:19 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.