Mark Rae
2007-05-01 16:53:21 UTC
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.
Virtually all the examples on Google and MSDN seem to be on how to write
add-ins - I don't want to do that.
I did find this article:
http://msdn2.microsoft.com/en-us/library/aa432009.aspx which I'm following
as closely as I can, but am coming unstuck...
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."
As far as I can tell, this should work, but have I missed a reference
somewhere or is there something else I've forgotten?
Any assistance gratefully received.
Mark
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.
Virtually all the examples on Google and MSDN seem to be on how to write
add-ins - I don't want to do that.
I did find this article:
http://msdn2.microsoft.com/en-us/library/aa432009.aspx which I'm following
as closely as I can, but am coming unstuck...
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."
As far as I can tell, this should work, but have I missed a reference
somewhere or is there something else I've forgotten?
Any assistance gratefully received.
Mark