I guess I'm doing something wrong but I can't quite figure this out.
I have referenced "Microsoft CDO 1.21 Library" in my application and when I execute the following code, I am prompted with the domain logon even though I have provided the profile and the password.
Dim objSession As MAPI.Session
Set objSession = CreateObject("MAPI.Session"
On Error GoTo logonErr
If Not objSession Is Nothing Then
' domain logon appears on execution of next line.
objSession.logon profileName, password
End If
logon = True
Exit Function
logonErr:
logon = False
I'm probably doing something wrong or I am barking up the wrong tree so I would appreciate someone setting me straight as I am new to CDO.
Thanks
I have referenced "Microsoft CDO 1.21 Library" in my application and when I execute the following code, I am prompted with the domain logon even though I have provided the profile and the password.
Dim objSession As MAPI.Session
Set objSession = CreateObject("MAPI.Session"
On Error GoTo logonErr
If Not objSession Is Nothing Then
' domain logon appears on execution of next line.
objSession.logon profileName, password
End If
logon = True
Exit Function
logonErr:
logon = False
I'm probably doing something wrong or I am barking up the wrong tree so I would appreciate someone setting me straight as I am new to CDO.
Thanks