hi everyone
I am using CDO and i am trying to call the outlook address book from a web based infopath form in a sharepoint site. Always an error occures.
In preview this code works fine. When i upload the form in a sharepoint site it leads to this error:
[Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]])
I tried everything!!!! Any ideas??????????
the code tha i use is this
objOutlook = CreateObject("MAPI.session")
Try
objOutlook.logon(ProfileName:="", showDialog:=False, ProfileInfo:="athens" & vbLf & Application.User.UserName)
Catch
ObjAddressBook = Nothing
ObjMessage = Nothing
objOutlook = Nothing
Exit Sub
End Try
ObjMessage = objOutlook.outbox.messages.add
ObjAddressBook = objOutlook.addressbook(ObjMessage.recipients, "Receivers", True, True, 1, "Receivers", "", "", 0)
objOutlook.logoff()