Jonathan,
Do you have the Outlook PIA installed?
The Outlook PIA is an optional install when you install Outlook 11, you need
to specifically install it.
Then as the Herfried & the others suggest you need either a project wide or
file specific import.
For a list of articles on using Outlook from .NET see:
http://www.microeye.com/resources/res_outlookvsnet.htm
For a plethora of automating Outlook with VBA, VB6, and VBScript see:
http://www.outlookcode.com/
To avoid the Outlook security prompts its generally easiest to create a
properly constructed COM-Addin for Outlook 2003. There are other methods
available for other versions of Outlook...
See:
http://msdn.microsoft.com/library/de...scomaddins.asp
Further info can be found at:
http://www.slipstick.com/dev/ol2003problems.htm http://www.slipstick.com/outlook/esecup/admin.htm
The links I gave have samples of creating add-ins.
Both of these are good articles to start with:
http://msdn.microsoft.com/library/de...addinvbnet.asp http://support.microsoft.com/?kbid=302896
Also, be certain you have explicitly installed the Outlook PIAs! The Outlook
2003 PIAs are an optional install, while the Outlook XP PIA is a download.
Hope this helps
Jay
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in message
news:6C**********************************@microsof t.com...
I am getting "Type Outlook.Application is not defined" on the line:
Dim olApp as New Outlook.Application()
I have added a reference to Outlook 11.0 Object Library, but the error is
still happening