SvenC
5/21/2007 3:45:00 PM
Hi Mark,
Mark Rae wrote:
> Hi,
>
> I'm trying to iterate through the contents of a folder in a pst file
> using VS.NET 2005 + SP1 and Outlook 2007 running on 64-bit Vista
> Business.
> I've added a reference to the Microsoft Office 12.0 Object Library
> (shows in Solution Explorer as Microsoft.Office.Core) and
> Microsoft.Office.Interop.Outlook, and am using the following code:
>
> using Office = Microsoft.Office.Core;
> using Outlook = Microsoft.Office.Interop.Outlook;
>
> Outlook.ApplicationClass _app = new Outlook.ApplicationClass();
>
> The code compiles OK, but the line Outlook.ApplicationClass _app = new
> Outlook.ApplicationClass(); generates the following error:
> "Retrieving the COM class factory for component with CLSID
> {0006F03A-0000-0000-C000-000000000046} failed due to the following
> error: 80080005."
Is this also happening when you execute the code from a vbs file?
Just put this into a file olTest.vbs and post the outcome when you double
click that file:
Dim o
Set o = CreateObject("outlook.Application")
MsgBox o.name
Also check if there is a difference when Outlook ist already started.
--
SvenC