QueryInterface for interface . . .Interop.Outlook._Application failed

H

Haim

Hi,

I'm having troubles accessing outlook 2003 from my .NET
windows application VB.NET form.
this is the code I'm using:

Imports Microsoft.Office.Interop

private sub ....
Dim olApp As Outlook.Application
Dim objSearch As Outlook.Search
Dim folInbox As Outlook.MAPIFolder


Try
olApp = New Outlook.Application
folInbox = olApp.GetNamespace
("MAPI").GetDefaultFolder("olFolderInbox")
Catch ex As Exception
MsgBox(ex.Message)
End Try
End sub

the exception is:
"QueryInterface for interface
Microsoft.Office.Interop.Outlook._Application failed."

my reference is to the outlook.dll (Microsoft Outlook
11.0 Object Library)
anybody has a clue as for what am I doing wrong?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top