ashetty
September 2nd, 2004, 08:02 AM
hi,
I am new to asp.net and also CDO. I want to display address book to user. I am doing this using MAPI
this is the piece of code i writting.
Public Function DisplayAddBook() As Boolean
Dim objSession As New MAPI.Session
Dim strProfileInfo As String
strProfileInfo = "exchangeservername" & vbLf & "MyUserid"
Try
objSession.Logon("", "", False, True, 0, True, strProfileInfo)
objSession.AddressBook( _
Title:="Select", _
forceResolution:=True, _
recipLists:=3, _
toLabel:="&abc", _
ccLabel:="&xyz", _
bccLabel:="&lmn")
Return True
Catch ex As Exception
Return False
End Try
End Function
there are two things i want to ask
1) on successfull logon objSession.Logon should return a object in my case it is returning System.DBNULL. What does this mean?
2) objSession.Addressbook gives an exception "[Collaboration Data Objects - [MAPI_E_NO_SUPPORT(80040102)]]".
This is urgent any help will be appreciated. Thanks in advance
I am new to asp.net and also CDO. I want to display address book to user. I am doing this using MAPI
this is the piece of code i writting.
Public Function DisplayAddBook() As Boolean
Dim objSession As New MAPI.Session
Dim strProfileInfo As String
strProfileInfo = "exchangeservername" & vbLf & "MyUserid"
Try
objSession.Logon("", "", False, True, 0, True, strProfileInfo)
objSession.AddressBook( _
Title:="Select", _
forceResolution:=True, _
recipLists:=3, _
toLabel:="&abc", _
ccLabel:="&xyz", _
bccLabel:="&lmn")
Return True
Catch ex As Exception
Return False
End Try
End Function
there are two things i want to ask
1) on successfull logon objSession.Logon should return a object in my case it is returning System.DBNULL. What does this mean?
2) objSession.Addressbook gives an exception "[Collaboration Data Objects - [MAPI_E_NO_SUPPORT(80040102)]]".
This is urgent any help will be appreciated. Thanks in advance