![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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. |
#2
|
|||
|
|||
![]()
Did you actually install CDO 1.21 on the Outlook 2007 system? It is a separate download.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "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. |
#3
|
|||
|
|||
![]()
Yupe, I have got CDO 1.21 installed. But still it is not working.
"Sue Mosher [MVP-Outlook]" wrote: Did you actually install CDO 1.21 on the Outlook 2007 system? It is a separate download. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "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. |
#4
|
|||
|
|||
![]()
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. |
#5
|
|||
|
|||
![]()
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. |
#6
|
|||
|
|||
![]()
Does that user have the same permissions as other users? Are you sure that
the user is using the correct alias and that they have permissions for that alias? Did you try the suggestion I made about changing the logon arguments? With a CDO logon it's a matter of permissions and getting your parameters correct. -- 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 ![]() 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. |
#7
|
|||
|
|||
![]()
I dont think, there is anything related to the permission of the user.
Because, if i set the code, in such a way that the profile name is selectable, then the code works fine, or else it doesnt. This happens only in this system. All other system, the profile name is not selectable, but the code works fine.... "Ken Slovak - [MVP - Outlook]" wrote: Does that user have the same permissions as other users? Are you sure that the user is using the correct alias and that they have permissions for that alias? Did you try the suggestion I made about changing the logon arguments? With a CDO logon it's a matter of permissions and getting your parameters correct. -- 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 ![]() 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. |
#8
|
|||
|
|||
![]()
Any Updates?
"AVIS" wrote: I dont think, there is anything related to the permission of the user. Because, if i set the code, in such a way that the profile name is selectable, then the code works fine, or else it doesnt. This happens only in this system. All other system, the profile name is not selectable, but the code works fine.... "Ken Slovak - [MVP - Outlook]" wrote: Does that user have the same permissions as other users? Are you sure that the user is using the correct alias and that they have permissions for that alias? Did you try the suggestion I made about changing the logon arguments? With a CDO logon it's a matter of permissions and getting your parameters correct. -- 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 ![]() 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. |
#9
|
|||
|
|||
![]()
Hi AVIS,
Set Session = New MAPI.Session ProfileInfo = ExchangeServer & vbLf & UserId If you have two userIds where one is the prefix of another you cannot log on to the short userID with a dynamic profile, because the two userIDs are counted as valid and none is chosen automatically. So if you have something like "user" and "userA" you will not be able to log on with user with a dynamic profile. This got more complex with Exchange = 2000 because several AD properties of a user are looked up. So the mailbox alias is only one attribute to look at. We had problems with the windows logon name as well. So please verify if the problematic system is really the system or if you just use a userID which is a prefix of another mailbox alias or user name. -- SvenC |
#10
|
|||
|
|||
![]()
Actually, it should be possible to do that by prefixing the userID with "=" to force an exact match, e.g. "=" & UserId
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "SvenC" wrote in message ... Hi AVIS, Set Session = New MAPI.Session ProfileInfo = ExchangeServer & vbLf & UserId If you have two userIds where one is the prefix of another you cannot log on to the short userID with a dynamic profile, because the two userIDs are counted as valid and none is chosen automatically. So if you have something like "user" and "userA" you will not be able to log on with user with a dynamic profile. This got more complex with Exchange = 2000 because several AD properties of a user are looked up. So the mailbox alias is only one attribute to look at. We had problems with the windows logon name as well. So please verify if the problematic system is really the system or if you just use a userID which is a prefix of another mailbox alias or user name. -- SvenC |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
CDO Outlook security prompt hangs, vb script Mapi Session | [email protected] | Outlook and VBA | 2 | April 17th 08 11:03 AM |
OLK2007 : The Oper Failed : Application.CreateObject("MAPI.Session | Bill Billmire | Outlook - Using Forms | 3 | January 7th 07 01:02 AM |
Redemption+CBuilder: RDOSession.Logon MAPILogonEx-Error | [email protected] | Add-ins for Outlook | 2 | September 1st 06 08:32 AM |
MAPI error | jackie | Outlook - Using Forms | 0 | August 18th 06 04:28 PM |
Error creating an MAPI session | Dominique Schroeder | Outlook - Using Forms | 1 | March 7th 06 02:25 PM |