![]() |
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,
I have a query regarding ActiveExplorer() instance in Outlook 2003 & Outlook 2007. We have a custom store and old client extension code written in C++. This works fine for all Outlook versions. These dlls creates custom store as well as custom menus in outlook menu bars. All these code are written in client extensions module. The code is simple - getting activeexplorer(), then getting commandbar and addinf new menus and toolbar buttons. This works fine with single instance of explorer. If we launch multiple versions of Outlook, menus in the outlook menu bar is not coming. This is happening only in Outlook 2003. get_activeexplorer() is called in init module of client extension and checks whether menu is already added in outlook menu bar. But outlook always returns first instance ActiveExplorer() eventhough if you launch 2nd instance of Outlook. IS there anyway to get active explorer for next outlook instance.? Do I need to set any active window for outlook? Thanks in Advance |
Ads |
#2
|
|||
|
|||
![]()
I'm a little confused. Only 1 instance of Outlook can run at a time. Do you
mean when you open additional Explorers this happens? ActiveExplorer() is the Explorer whose window is currently active. You can get the Explorers collection and check its Count property to see how many Explorers are actually open. If you want to activate a specific Explorer you can do so by calling the Activate() method. What many of us do to handle multiple open Explorers (or Inspectors) is to use a wrapper class that handles any events of an Explorer that we want to handle. Each class is then stored in a collection/list of some type to keep the references alive and provide separation among Explorers. Each class gets a Key value that's used when creating CommandBar UI to append to the Tag property. That provides a unique Tag property, necessary so that a button click doesn't fire in all open Explorers but only in the targeted Explorer. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "WLAN" wrote in message ... Hi, I have a query regarding ActiveExplorer() instance in Outlook 2003 & Outlook 2007. We have a custom store and old client extension code written in C++. This works fine for all Outlook versions. These dlls creates custom store as well as custom menus in outlook menu bars. All these code are written in client extensions module. The code is simple - getting activeexplorer(), then getting commandbar and addinf new menus and toolbar buttons. This works fine with single instance of explorer. If we launch multiple versions of Outlook, menus in the outlook menu bar is not coming. This is happening only in Outlook 2003. get_activeexplorer() is called in init module of client extension and checks whether menu is already added in outlook menu bar. But outlook always returns first instance ActiveExplorer() eventhough if you launch 2nd instance of Outlook. IS there anyway to get active explorer for next outlook instance.? Do I need to set any active window for outlook? Thanks in Advance |
#3
|
|||
|
|||
![]()
Also take a look at the Application.Explorers.NewExplorer event.
-- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Ken Slovak - [MVP - Outlook]" wrote in message ... I'm a little confused. Only 1 instance of Outlook can run at a time. Do you mean when you open additional Explorers this happens? ActiveExplorer() is the Explorer whose window is currently active. You can get the Explorers collection and check its Count property to see how many Explorers are actually open. If you want to activate a specific Explorer you can do so by calling the Activate() method. What many of us do to handle multiple open Explorers (or Inspectors) is to use a wrapper class that handles any events of an Explorer that we want to handle. Each class is then stored in a collection/list of some type to keep the references alive and provide separation among Explorers. Each class gets a Key value that's used when creating CommandBar UI to append to the Tag property. That provides a unique Tag property, necessary so that a button click doesn't fire in all open Explorers but only in the targeted Explorer. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "WLAN" wrote in message ... Hi, I have a query regarding ActiveExplorer() instance in Outlook 2003 & Outlook 2007. We have a custom store and old client extension code written in C++. This works fine for all Outlook versions. These dlls creates custom store as well as custom menus in outlook menu bars. All these code are written in client extensions module. The code is simple - getting activeexplorer(), then getting commandbar and addinf new menus and toolbar buttons. This works fine with single instance of explorer. If we launch multiple versions of Outlook, menus in the outlook menu bar is not coming. This is happening only in Outlook 2003. get_activeexplorer() is called in init module of client extension and checks whether menu is already added in outlook menu bar. But outlook always returns first instance ActiveExplorer() eventhough if you launch 2nd instance of Outlook. IS there anyway to get active explorer for next outlook instance.? Do I need to set any active window for outlook? Thanks in Advance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[C++, ATL] Editing new Outlook message in Word. How can I get ActiveExplorer? | [email protected] | Add-ins for Outlook | 1 | June 19th 07 09:34 PM |
Addin button not showing up -- problem with ActiveExplorer? | [email protected] | Add-ins for Outlook | 4 | April 14th 07 06:50 PM |
Find and select mail in ActiveExplorer | Gvaram | Outlook and VBA | 2 | October 1st 06 07:19 PM |
Cancelling Outlook.Application.ActiveExplorer.Close event? | Nathan | Add-ins for Outlook | 1 | September 8th 06 07:14 PM |