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

ActiveExplorer



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 25th 09, 05:53 PM posted to microsoft.public.outlook.program_addins
WLAN
external usenet poster
 
Posts: 49
Default ActiveExplorer

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  
Old February 26th 09, 02:29 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default ActiveExplorer

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  
Old February 26th 09, 04:59 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default ActiveExplorer

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
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
[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


All times are GMT +1. The time now is 08:11 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.