![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]() 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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |