473,386 Members | 1,943 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,386 software developers and data experts.

instantiate OUTLOOK from ASP.net/VB

Hi.

I am writing an INTRAnet app using asp.net/VB that, amongst other things,
needs to access the global address list in Outlook, extract some email
addresses and send email to these people.

(actually, I believe I will have to be using Outlook's Web client).

I am spending vast amounts of time trawling unsuccessfully thru MSDN and
Help for something that would allow me to make some progress, but
unsuccessfuly.

Does anyone have the few lines of code necessary to open Outlook - I can pro
ceed with collections and methods from there .... I just cant get to a
starting points.

I can do all of this in VB6 but, being brand new to .net, hear rumours of
Com Interop and Assemblies and can find no directions.

Thanks.
Greg
Jul 21 '05 #1
4 4975
this can make you started :

'Create Outlook application.
Dim oApp As Outlook.Application = New Outlook.Application

'Get namespace, Tasks and Calendar folders references.
Dim oNS As Outlook.NameSpace = oApp.GetNamespace("MAPI")
Dim cTasks As Outlook.MAPIFolder =
oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFo lderTasks)
Dim cCalendar As Outlook.MAPIFolder =
oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFo lderCalendar)

Dim oTt As Outlook.TaskItem
Dim oAt As Outlook.AppointmentItem

"Greg" wrote:
Hi.

I am writing an INTRAnet app using asp.net/VB that, amongst other things,
needs to access the global address list in Outlook, extract some email
addresses and send email to these people.

(actually, I believe I will have to be using Outlook's Web client).

I am spending vast amounts of time trawling unsuccessfully thru MSDN and
Help for something that would allow me to make some progress, but
unsuccessfuly.

Does anyone have the few lines of code necessary to open Outlook - I can pro
ceed with collections and methods from there .... I just cant get to a
starting points.

I can do all of this in VB6 but, being brand new to .net, hear rumours of
Com Interop and Assemblies and can find no directions.

Thanks.
Greg

Jul 21 '05 #2
i think it would work only on windows applications with the outlook client
installed.. havent tried it on a webserver with asp.net,

"Greg" wrote:
Hi.

I am writing an INTRAnet app using asp.net/VB that, amongst other things,
needs to access the global address list in Outlook, extract some email
addresses and send email to these people.

(actually, I believe I will have to be using Outlook's Web client).

I am spending vast amounts of time trawling unsuccessfully thru MSDN and
Help for something that would allow me to make some progress, but
unsuccessfuly.

Does anyone have the few lines of code necessary to open Outlook - I can pro
ceed with collections and methods from there .... I just cant get to a
starting points.

I can do all of this in VB6 but, being brand new to .net, hear rumours of
Com Interop and Assemblies and can find no directions.

Thanks.
Greg

Jul 21 '05 #3
Greg,
The "global address list" suggests you really want to access information in
Exchange Server.

For a discussion on selecting development technologies for Exchange Server,
start here:

http://msdn.microsoft.com/library/de...hsel_intro.asp

The following site provides a good place to start on articles about using
Outlook & .NET, it includes a handful of articles on CDO & .NET.

http://www.microeye.com/resources/res_outlookvsnet.htm

Hope this helps
Jay
"Greg" <Gr**@discussions.microsoft.com> wrote in message
news:A5**********************************@microsof t.com...
Hi.

I am writing an INTRAnet app using asp.net/VB that, amongst other things,
needs to access the global address list in Outlook, extract some email
addresses and send email to these people.

(actually, I believe I will have to be using Outlook's Web client).

I am spending vast amounts of time trawling unsuccessfully thru MSDN and
Help for something that would allow me to make some progress, but
unsuccessfuly.

Does anyone have the few lines of code necessary to open Outlook - I can
pro
ceed with collections and methods from there .... I just cant get to a
starting points.

I can do all of this in VB6 but, being brand new to .net, hear rumours of
Com Interop and Assemblies and can find no directions.

Thanks.
Greg

Jul 21 '05 #4
and remember, there are issues with server-side automation of office apps.

http://support.microsoft.com/kb/257757

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:Ox**************@TK2MSFTNGP09.phx.gbl...
Greg,
The "global address list" suggests you really want to access information
in Exchange Server.

For a discussion on selecting development technologies for Exchange
Server,
start here:

http://msdn.microsoft.com/library/de...hsel_intro.asp

The following site provides a good place to start on articles about using
Outlook & .NET, it includes a handful of articles on CDO & .NET.

http://www.microeye.com/resources/res_outlookvsnet.htm

Hope this helps
Jay
"Greg" <Gr**@discussions.microsoft.com> wrote in message
news:A5**********************************@microsof t.com...
Hi.

I am writing an INTRAnet app using asp.net/VB that, amongst other
things,
needs to access the global address list in Outlook, extract some email
addresses and send email to these people.

(actually, I believe I will have to be using Outlook's Web client).

I am spending vast amounts of time trawling unsuccessfully thru MSDN and
Help for something that would allow me to make some progress, but
unsuccessfuly.

Does anyone have the few lines of code necessary to open Outlook - I can
pro
ceed with collections and methods from there .... I just cant get to a
starting points.

I can do all of this in VB6 but, being brand new to .net, hear rumours of
Com Interop and Assemblies and can find no directions.

Thanks.
Greg


Jul 21 '05 #5

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

Similar topics

2
by: Fritz Switzer | last post by:
Can anyone provide a small snippet in C# that pulls out the Contacts in Outlook XP. I've seen a couple of examples in C++ and VB in previous newsgroup posts, but either the originals didn't work...
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...
9
by: Srinivas | last post by:
hi all how to access the outlook user profiles through VB.net any help.... thanks in advanc Srinivas
9
by: George McCullen | last post by:
I have an Outlook 2003 using Exchange Server 2003 Public Contacts Folder containing 20,000 Contacts. I am writing a VB .Net 2003 program that loops through all the contacts in a "for each oCt in...
3
by: John | last post by:
Hi I am trying to access outlook contacts folders and delete the contacts that do not contain a certain category value in the categories field. I have written the below code but am stuck with...
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...
4
by: Greg | last post by:
Hi. I am writing an INTRAnet app using asp.net/VB that, amongst other things, needs to access the global address list in Outlook, extract some email addresses and send email to these people. ...
3
by: wizzbangca | last post by:
Hi everyone. Having problems with a utility I am writing for work. The previous IT Director thoughtfully allowed 3 (2000, xp, 2003) versions of outlook to be installed rather than 1. Now I need...
4
by: Tomas | last post by:
A newbie question: How can I instantiate objects dynamically in VB.NET. E.g. I have the object 'Player' and I would like to instantiate it with the several instances (James, Gunner, etc.), without...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.