![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |