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 / Interop / January 2005

Tip: Looking for answers? Try searching our database.

Reaching local Outlook AND Exchange...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rodzilla - 20 Jan 2005 01:21 GMT
We have a Windows forms application that is installed on all sorts of personal computers...some running Outlook locally, some using various combinations of local files and Exchange...and of course a happy mixture of OL2002 AND ol2003 just to add some excitement...the code below fails when Exchange is any part of the user's mix...and works fine when Exchange is NOT part of the equation...

--------------------------------------------------------------------------------
Dim oApp As Object = CreateObject("Outlook.Application")
Dim oNS As Object

oNS = oApp.GetNamespace("mapi")

oNS.Logon(, , False, False)

--------------------------------------------------------------------------------

The error message is "Cannot create Active X component"......

Is there any way for a Windows form application to open/reach Outlook when Exchange is part of the user's world?

Thanks in advance for any help...

Rod Kimmel
Sue Mosher [MVP-Outlook] - 20 Jan 2005 02:19 GMT
Look for antivirus applications with slightly paranoid script blockers that
don't allow access to CreateObject("Outlook.Application").

Once you get beyond that statement, you might try showing the Logon dialog.
Your Logon statement probably may not always result in a valid session.

Signature

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

We have a Windows forms application that is installed on all sorts of
personal computers...some running Outlook locally, some using various
combinations of local files and Exchange...and of course a happy mixture of
OL2002 AND ol2003 just to add some excitement...the code below fails when
Exchange is any part of the user's mix...and works fine when Exchange is NOT
part of the equation...

--------------------------------------------------------------------------------
Dim oApp As Object = CreateObject("Outlook.Application")
Dim oNS As Object

oNS = oApp.GetNamespace("mapi")

oNS.Logon(, , False, False)

--------------------------------------------------------------------------------

The error message is "Cannot create Active X component"......

Is there any way for a Windows form application to open/reach Outlook when
Exchange is part of the user's world?

Thanks in advance for any help...

Rod Kimmel
 
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.