Hello
Im trying to get email addresses out of the global address list and
write them out to a web page. I am using Exchange 5.5. This is a
asp.net application running on an XP machine. It uses version 1.21 of
MS CDO.
The code is as follows:
Dim strProfileInfo As String
Dim ObjSession As New MAPI.Session
Dim objAddressListType As New MAPI.CdoAddressListTypes
Dim objAddressList
Dim objAddressEntry
Dim strServer As String = "" --I have a valid sever here
Dim strMailbox As String = "" --I have a valid mailbox
here
strProfileInfo = strServer & vbLf & strMailbox
ObjSession.Logon(, , False, True, , True, strProfileInfo)
objAddressList =
ObjSession.GetAddressList(objAddressListType.CdoAddressListGAL)
'list all addresses in the gal
For Each objAddressEntry In objAddressList
Response.Write(objAddressEntry.Address())
Next
The code fails during the GetAddressList function with a
"[Collaboration Data Objects - [E_FAIL(80004005)]] " error message.
Any help here would be very much appreciated.
Thanks.
Jeff
Archived from group: microsoft>public>exchange>applications