Help with QueryInterface for interface 'Outlook._Application'

  • Thread starter Thread starter Brett
  • Start date Start date
B

Brett

I'd like to know if any one can execute this piece of code in VS Studio .NET
2005 beta:

Dim myolApp As New Outlook.Application
Dim myNamespace As Outlook.NameSpace
myNamespace = myolApp.GetNamespace("MAPI")
myFolder = myNamespace.GetDefaultFolder(olFolderInbox)

The last line always brings up this error:

QueryInterface for interface 'Outlook._Application'

Here are my configurations:
Win XP SP 2
Office 2002 SP3

PIAs installed to a directory and I reference them in my project:
office.dll
microsoft.office.interop.outlook.dll
microsoft.office.interop.outlookviewctl.dll
microsoft.vbe.interop.dll

I also reference:
MS Office 10.0 Object Library
MS Outlook 10 Object Library

Does any one know why the above code keeps breaking?

Thanks,
Brett
 
Have you been able to solve this problem? I am having the same issue.

What problem? What same issue? You didn't quote any of the message to
which you were responding so there is no context.
 
Back
Top