![]() |
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? |
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? |
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? |
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? |
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? |
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? |
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? |
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? |
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 |
All times are GMT +1. The time now is 11:55 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-2006 OutlookBanter.com