J
jeff
Hi.
I am trying to read addresses from an Exchange 5.5 Global
Address Book from an asp.net page. When the page executes
the error "Collaboration Data Objects - [E_FAIL
(80004005)]]" is generated.
Here is the code:
Dim strProfileInfo As String
Dim ObjSession As New MAPI.Session
Dim objAddressListType As New
MAPI.CdoAddressListTypes
Dim objAddressList As New Object
Dim objAddressEntry As New Object
Dim strServer As String = "" - valid server
name here
Dim strMailbox As String = "" - 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 ObjSession.GetAddressList method call is the line
that generates the error.
We are running Exchange 5.5. I am using CDO version
1.21. The web server and the exchange server are two
different machines. The web server, which is my localhost
for now, is running XP.
I would be thankfull for any help.
Thanks.
Jeff
I am trying to read addresses from an Exchange 5.5 Global
Address Book from an asp.net page. When the page executes
the error "Collaboration Data Objects - [E_FAIL
(80004005)]]" is generated.
Here is the code:
Dim strProfileInfo As String
Dim ObjSession As New MAPI.Session
Dim objAddressListType As New
MAPI.CdoAddressListTypes
Dim objAddressList As New Object
Dim objAddressEntry As New Object
Dim strServer As String = "" - valid server
name here
Dim strMailbox As String = "" - 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 ObjSession.GetAddressList method call is the line
that generates the error.
We are running Exchange 5.5. I am using CDO version
1.21. The web server and the exchange server are two
different machines. The web server, which is my localhost
for now, is running XP.
I would be thankfull for any help.
Thanks.
Jeff