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 » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Error while creating Outlook-Application-Object on OL2003/Vista?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 20th 07, 11:30 AM posted to microsoft.public.outlook.program_vba
wuschba
external usenet poster
 
Posts: 5
Default Error while creating Outlook-Application-Object on OL2003/Vista?

Hi. I'm just trying to connect to Outlook 2003 from my C#-Application on
Vista. I added "Microsoft Outlook 11.0 Object Library" to the references of
my object, and then I'm calling:

using Outlook = Microsoft.Office.Interop.Outlook;
....
[STAThread]
static void Main(string[] args)
{
Outlook.Application application = new Outlook.Application();
}

Thats all. It works, when Outlook has not been started, but with Outlook
running, I get the error: Retrieving the COM class factory for component with
CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following
error: 80080005.

I installed the PIAs, and I checked that my references point to
\Windows\Assembly\GAC\.

Any ideas about that?
Ads
  #2  
Old July 23rd 07, 02:46 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Error while creating Outlook-Application-Object on OL2003/Vista?

I've seen that only a couple of times and each time it was related to an
Outlook COM addin that was doing something that prevented starting Outlook
that way from a standalone program when Outlook was already running.

What Outlook COM addins are running that might present a problem? Disable
all addins and see if your code works then. If so then re-enable the addins
one at a time until you find the culprit.

I've seen it happen with a Skype addin (the developer is aware of the
problem and looking at it with some test code I sent him) and the Plaxo
Outlook addin, which causes all sorts of other problems too.

The odd thing is that in the situations I've seen similar code works just
fine when run using VBA, such as simple automation in Word or Excel VBA to
start Outlook. So it's a mix in those cases of something an addin was doing
plus the COM Interop.

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


"wuschba" wrote in message
...
Hi. I'm just trying to connect to Outlook 2003 from my C#-Application on
Vista. I added "Microsoft Outlook 11.0 Object Library" to the references
of
my object, and then I'm calling:

using Outlook = Microsoft.Office.Interop.Outlook;
...
[STAThread]
static void Main(string[] args)
{
Outlook.Application application = new Outlook.Application();
}

Thats all. It works, when Outlook has not been started, but with Outlook
running, I get the error: Retrieving the COM class factory for component
with
CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following
error: 80080005.

I installed the PIAs, and I checked that my references point to
\Windows\Assembly\GAC\.

Any ideas about that?


  #3  
Old July 25th 07, 08:38 AM posted to microsoft.public.outlook.program_vba
wuschba
external usenet poster
 
Posts: 5
Default Error while creating Outlook-Application-Object on OL2003/Vist

I've seen that only a couple of times and each time it was related to an
Outlook COM addin that was doing something that prevented starting Outlook
that way from a standalone program when Outlook was already running.

Thanks for your reply. I run skype, but there seems no add-in in outlook
from skype.

I only found one add-in ("properties-pages of the exchange-extension"), but
disabling it wouldn't help unfortunatly...

Any other ideas?

  #4  
Old July 25th 07, 02:03 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Error while creating Outlook-Application-Object on OL2003/Vist

That's an Exchange extension and not a COM addin. Check in the registry at
\Software\Microsoft\Office\Outlook\Addins in both HKCU and HKLM to see what
addins are installed.

Other than that I have no ideas.

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


"wuschba" wrote in message
...
I've seen that only a couple of times and each time it was related to an
Outlook COM addin that was doing something that prevented starting
Outlook
that way from a standalone program when Outlook was already running.

Thanks for your reply. I run skype, but there seems no add-in in outlook
from skype.

I only found one add-in ("properties-pages of the exchange-extension"),
but
disabling it wouldn't help unfortunatly...

Any other ideas?


  #5  
Old July 26th 07, 03:24 PM posted to microsoft.public.outlook.program_vba
wuschba
external usenet poster
 
Posts: 5
Default Error while creating Outlook-Application-Object on OL2003/Vist

That's an Exchange extension and not a COM addin. Check in the registry at
\Software\Microsoft\Office\Outlook\Addins in both HKCU and HKLM to see what
addins are installed.

Ah okay. I got 5 Addins there (BlueTooth, Anti-Virus, Microsoft-VbaAddin,
OAddin(?), Search.OutlookToolbar). How can I disable them to do a test?

  #6  
Old July 26th 07, 03:49 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Error while creating Outlook-Application-Object on OL2003/Vist

The VBA one is almost never a problem, but to disable them set LoadBehavior
to 2 from 3. Do that while Outlook isn't running. The addins won't start and
if the problem goes away you can then re-enable the addins one at a time by
setting LoadBehavior back to 3 and starting Outlook until you find the
problem addin. Offhand I'd suggest trying with Bluetooth, the AV addin and
OAddin.

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


"wuschba" wrote in message
...
That's an Exchange extension and not a COM addin. Check in the registry
at
\Software\Microsoft\Office\Outlook\Addins in both HKCU and HKLM to see
what
addins are installed.

Ah okay. I got 5 Addins there (BlueTooth, Anti-Virus, Microsoft-VbaAddin,
OAddin(?), Search.OutlookToolbar). How can I disable them to do a test?


  #7  
Old August 29th 07, 12:12 PM posted to microsoft.public.outlook.program_vba
wuschba
external usenet poster
 
Posts: 5
Default Error while creating Outlook-Application-Object on OL2003/Vist

Hi Ken,

I found the time to do some more tests: The problem is not an AddIn, it's
the user access control of Vista! I can disable all AddIns, but it still
doesn't work with UAC enabled. I can enable all AddIns, but disable UAC, and
it works.

Is this ment "by design", which means: There is no way to connect to Outlook
with UAC enabled?

  #8  
Old August 29th 07, 02:07 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Error while creating Outlook-Application-Object on OL2003/Vist

In that case you might need to request an elevation of privileges in your
code before you try to create the application object. That I have no idea
about, you might want to check in a Vista development forum on how to do
that.

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


"wuschba" wrote in message
...
Hi Ken,

I found the time to do some more tests: The problem is not an AddIn, it's
the user access control of Vista! I can disable all AddIns, but it still
doesn't work with UAC enabled. I can enable all AddIns, but disable UAC,
and
it works.

Is this ment "by design", which means: There is no way to connect to
Outlook
with UAC enabled?


  #9  
Old August 29th 07, 02:54 PM posted to microsoft.public.outlook.program_vba
wuschba
external usenet poster
 
Posts: 5
Default Error while creating Outlook-Application-Object on OL2003/Vist

I will try to discuss this in a C#-forum then. Anyway, thanks for your help!

"Ken Slovak - [MVP - Outlook]" wrote:

In that case you might need to request an elevation of privileges in your
code before you try to create the application object. That I have no idea
about, you might want to check in a Vista development forum on how to do
that.

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


 




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
Object Access with Vista Windows Calendar DENNIS BROWN Outlook and VBA 0 March 31st 07 09:41 PM
Outlook Application ActiveWindow() always return Explorer object AtulSureka Outlook - Using Forms 3 October 10th 06 02:31 PM
Where is MS Forms 2.0 Object Library in OL2003 References? John E. Outlook - Using Forms 7 October 4th 06 05:25 PM
Runtime error 80004005 Creating Outlook.Application Dave Add-ins for Outlook 6 July 18th 06 10:18 PM
OL2003: Convert an Object JPL Outlook and VBA 2 June 6th 06 06:58 PM


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