473,379 Members | 1,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Type Outlook.Application is not defiined

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
Nov 21 '05 #1
6 20550
Hi,

Try interop.outlook.application

Ken
-----------------------
"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
Nov 21 '05 #2
Try adding the following import:

Imports Outlook = Microsoft.Office.Interop.Outlook
Nov 21 '05 #3
now get "type interop.outlook.application is not defined"

"Ken Tucker [MVP]" wrote:
Hi,

Try interop.outlook.application

Ken
-----------------------
"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

Nov 21 '05 #4
Jonathan,

"Jonathan Smith" <Jo***********@discussions.microsoft.com> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #5
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.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ej**************@TK2MSFTNGP09.phx.gbl...
Jonathan,

"Jonathan Smith" <Jo***********@discussions.microsoft.com> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #6
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

Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: deko | last post by:
Okay, so I figured out how to pull Outlook Appointments into an Access Table (see below). But the data comes in the wrong Data Type - how do I convert it from Text to Long Integer? For...
0
by: PIKACHU | last post by:
Hi, I hope someone can help me. I do not usualy write question in newsgroup since I usualy some had the same problem I had. However, I can't find any articles that would solve my problem. I...
10
by: John | last post by:
Hi When I open a new outlook email from vb.net, sometimes outlook is very slow to appear or occasionally outlook freezes completely. I am targeting mixed office2000/xp environments so I am...
16
by: Dennis | last post by:
I have a class named "myclass" and an arraylist containing elements of type "MyClass". I want to get the value of a property of "MyClass" (a string type) for one of the arraylist elements. I...
7
by: Chris Thunell | last post by:
I'm trying to loop through an exchange public folder contact list, get some information out of each item, and then put it into a vb.net datatable. I run though the code and all works fine until i...
5
by: PJ6 | last post by:
Select Case o.GetType Case = GetType(SomeRandomTypeName) '... End Select Why doesn't this work? Can I make it work or am I stuck with ElseIf for a long list? Paul
9
by: Eric | last post by:
Hi Everyone, I'm writing a UserControl that exposes a property of the type System.Drawing.Image, like this: Public Property DefaultImage() As Image Get Return propDefaultImage End Get...
3
by: tshad | last post by:
I have a program that is reading one of my mailboxes. It is polling the mailboxes ever 5 minutes to see if there is a message or not. Is this how Outlook does it (using Exchange as the...
3
by: Kosmos | last post by:
I can't seem to figure out why I'm getting a type mismatch here...any suggestions? Any help would be greatly appreciated. Thanks! 'trying to...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.