instantiate OUTLOOK from ASP.net/VB

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

Guest

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
 
i think it would work only on windows applications with the outlook client
installed.. havent tried it on a webserver with asp.net,
 
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.olFolderTasks)
Dim cCalendar As Outlook.MAPIFolder =
oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar)

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