|
Dan Evrard
Posts: 2
Joined: 2013-08-16
|
Hello,
I'm working on upgrading an outlook add-in to Outlook 2013. However, when I instantiate the Interop.Outlook.Application object, I am getting this error message:
System.Runtime.InteropServices.COMException (0x80080005): Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005.
The code in question is this:
Dim outlookApplication As New MSOutlook.Application
From what I've gathered googling the issue, it seems that it could possibly be an issue with outlook not being run with the same user permissions as Visual Studio 2010. However, running outlook as administrator is not really an option for all of our clients, so I'm hoping there could be some other resolution to this issue.
Thanks,
Dan |
|
|
Andrei Smolin
Add-in Express team
Posts: 19226
Joined: 2006-05-11
|
Hello Dan,
You will get this issue if you run VS using the "Run as administrator" option and Outlook is started without that option.
On the other hand, an Outlook add-in isn't expected to create new Outlook instances. Besides, New MSOutlook.Application creates a "non-trusted" Outlook.Application object and this may end with your add-in firing security warnings. You can get the correct Outlook.Application object using this code path: {project name e.g. MyAddin1}.AddinModule.CurrentInstance.OutlookApp.
Andrei Smolin
Add-in Express Team Leader |
|
|
Dan Evrard
Posts: 2
Joined: 2013-08-16
|
|
That's exactly what I needed. Thank you! |
|