
April 18th 08, 05:47 AM
posted to microsoft.public.outlook.program_vba
|
|
|
MAPI Session Logon error
For the first question, No, the user specifies the admin details of the
exchange server
The server details are from the database and the same details are used by
other users, where the program is working fine.
"Ken Slovak - [MVP - Outlook]" wrote:
So the Session instantiates when using ShowDialog? Does the user enter their
normal logon in that dialog?
Do the parameters for the dynamic logon look valid on the problem machine?
How are you deriving ExchangeServer and UserId?
In general, when using a dynamic logon (where UserId must match the existing
mailbox name) you'd use something like this:
Session.Logon "", "", False, True, 0, False, sProfileInfo
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"AVIS" wrote in message
news
Hi All,
I have a Visual Basic application which has the below code
Set Session = New MAPI.Session
ProfileInfo = ExchangeServer & vbLf & UserId
Call Session.Logon(, , False, , , , sProfileInfo)
Set Contacts = Session.GetDefaultFolder(CdoDefaultFolderContacts)
It is working fine in my PC with WINDOWS XP Professional and OUTLOOK 2003.
But the "Set oContacts = ..", given in the above coding snapshot returns
an
error message, in one of the user's PC. The error is happening in a
system
with WINDOWS 2003 and OUTLOOK 2007. When I replace the statement "Call
oSession.Logon(, , False, , , , sProfileInfo)" with the statement as
Call oSession.Logon(, , True, False), it is working fine
Can anyone tell me, why this is happening, is it some envvironment issue?
I cant change the code in the application, since this is the only user,
who
is having the problem and the others (I hope all are using WINDOWS XP,
with
OUTLOOK 2003) are not having the problem.
|