Type Outlook.Application is not defiined

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Hi,

Try interop.outlook.application

Ken
-----------------------
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
 
Jonathan,

Jonathan Smith said:
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

Make sure you have a project-wide import for 'Microsoft.Office.Interop', or
'Imports Microsoft.Office.Interop' on top of the file containing the source
code.
 
I had this same problem. The way that i fixed this problem is by
reinstalling office will all options. I beleive that something is not being
installed which is causing the outlook interop to crash. I am not sure about
this.
But like I said reinstalling Office will all options fixed this problem.
 
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/d...dc_ol2003_ta/html/odc_olsecnotescomaddins.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/default.asp?url=/library/en-us/dnout2k2/html/odc_oladdinvbnet.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
 

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

Back
Top