Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / April 2004

Tip: Looking for answers? Try searching our database.

Invalid Explorer objects

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marius Seglsten - 23 Apr 2004 09:33 GMT
I am trying to develope an AddIn for Microsoft Outlook where I wish to
add a CommandBar to the Explorer objects. I am using Visual Studio
.NET 2003.

I have two problems, depending on the version of Office that I am
running.
Outlook XP (2002):
When calling Application.ActiveExplorer() I always get an error saying
"The explorer has been closed and connot be used for further
operations". The same thing happens when trying to receive
notification of new Explorer instances by using the "NewExplorer"
event.

Outlook 2003:
In Outlook 2003 the Application.ActiveExplorer() works fine, but when
accessing the Explorer object recieved from the "NewExplorer" event, I
get the same error as in Outlook XP ("The explorer has been closed and
connot be used for further operations") in some situations:
1: When starting Outlook by running the executable, everything is ok.
2: When the Outlook process has been started by an external
application (like CreateObject("Outlook.Application")) the error
occurs.

I have tried a lot of different things, and nothing seems to work. I
have searched after others with similar problems, but haven't found
anyone at all. Please help!

Best regards,
Marius Seglsten
Ken Slovak - [MVP - Outlook] - 23 Apr 2004 13:39 GMT
When Outlook has been started using automation it may not have any Explorers
at all. That's the situation for example when ActiveSynch starts Outlook.
Normally, one would check for Explorers.Count > 0 to see if that's the case.
In fact, at any time when you are checking for Explorers you can check for
that to see if there are any Explorers. If not then there can't be an
ActiveExplorer.

Beyond that I'd suggest looking at the .NET Outlook coding information at
http://www.microeye.com/resources/res_outlookvsnet.htm. If you are using
VB.NET see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnout2k2/html/o
dc_oladdinvbnet.asp

for some good code samples.

One thing you might want to look at is how that code works with
ActiveExplorer:
'Type conversion is required due to "ambiguous name" issue.
  m_olExplorer = CType(m_olOutlook.ActiveExplorer, Outlook.ExplorerClass)

Signature

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

> I am trying to develope an AddIn for Microsoft Outlook where I wish to
> add a CommandBar to the Explorer objects. I am using Visual Studio
[quoted text clipped - 25 lines]
> Best regards,
> Marius Seglsten
Sue Mosher [MVP-Outlook] - 23 Apr 2004 14:59 GMT
Can you post a code snippet that illustrates the problem?

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> I am trying to develope an AddIn for Microsoft Outlook where I wish to
> add a CommandBar to the Explorer objects. I am using Visual Studio
[quoted text clipped - 25 lines]
> Best regards,
> Marius Seglsten
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.