R
ravi_pv
Hi all,
It has been quit interesting, exploring various option in
integration Exchange server, outlook and my .net
application.
The requirement is quite simple. I need to get all the e-
mail address form the global address list.
I m forced to use Microsoft Outlook 9.0 object library
ahead of MAPI as .Net frame work dnt not support MAPI.
I m able to connect the the Global Address book, but
unable to retrive the email address. I m able to get the
name, display time and all basic stuff other then e-mail
address.
Dim oApp As Outlook.Application = New Outlook.Application
Dim oNS As Outlook.NameSpace = oApp.GetNamespace("mapi")
oNS.Logon("MyProfile", Missing.Value, False, True)
Dim oDLs As Outlook.AddressLists = oNS.AddressLists
Dim oGal As Outlook.AddressList = oDLs.Item("Global
Address List")
Dim sDL As String = "MyDistributionList"
Dim oEntries As Outlook.AddressEntries =
oGal.AddressEntries
Dim oDL As Outlook.AddressEntry = oEntries.Item(sDL)
Response.Write(oDL.Name & "<br>")
Response.Write(oDL.Address & "<br>")
Response.Write(oDL.Manager)
But Address method provides me somthing like
/o=ABC/ou=SINGAPORE-FB/cn=Recipients/cn=thsnewgroup
where as i expect the email address ([email protected])
format form the address method.
There are many articles that say was can get it using MAPI
object. Since .Net dnt support MAPI and we have some
authentication problem with using MAPI in ASP.net. we are
looking in using Outlook Object.
So the question is, is it possible to get the email
address using the Microsoft Outlook 9.0 object?
thanks and regards,
s. ravi
It has been quit interesting, exploring various option in
integration Exchange server, outlook and my .net
application.
The requirement is quite simple. I need to get all the e-
mail address form the global address list.
I m forced to use Microsoft Outlook 9.0 object library
ahead of MAPI as .Net frame work dnt not support MAPI.
I m able to connect the the Global Address book, but
unable to retrive the email address. I m able to get the
name, display time and all basic stuff other then e-mail
address.
Dim oApp As Outlook.Application = New Outlook.Application
Dim oNS As Outlook.NameSpace = oApp.GetNamespace("mapi")
oNS.Logon("MyProfile", Missing.Value, False, True)
Dim oDLs As Outlook.AddressLists = oNS.AddressLists
Dim oGal As Outlook.AddressList = oDLs.Item("Global
Address List")
Dim sDL As String = "MyDistributionList"
Dim oEntries As Outlook.AddressEntries =
oGal.AddressEntries
Dim oDL As Outlook.AddressEntry = oEntries.Item(sDL)
Response.Write(oDL.Name & "<br>")
Response.Write(oDL.Address & "<br>")
Response.Write(oDL.Manager)
But Address method provides me somthing like
/o=ABC/ou=SINGAPORE-FB/cn=Recipients/cn=thsnewgroup
where as i expect the email address ([email protected])
format form the address method.
There are many articles that say was can get it using MAPI
object. Since .Net dnt support MAPI and we have some
authentication problem with using MAPI in ASP.net. we are
looking in using Outlook Object.
So the question is, is it possible to get the email
address using the Microsoft Outlook 9.0 object?
thanks and regards,
s. ravi