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?