Re: Outlook 2003 through VB.NET

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Tom Rizzo [MSFT] (thomriz_at_microsoft.com)
Date: 11/02/04


Date: Mon, 1 Nov 2004 21:14:16 -0800

Did you install the PIA for Outlook? Go to office setup and make sure .NET
programmability is checked for Outlook.

Tom

-- 
Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint?  Check out http://www.microsoft.com/MSPress/books/5517.asp
"Haim" <haim_lz@hot.com> wrote in message 
news:27f901c4c01f$77658e80$a601280a@phx.gbl...
> 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?
> 


Relevant Pages