PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Form Programming
CDO Access hangs outlook
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Form Programming
CDO Access hangs outlook
![]() |
CDO Access hangs outlook |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I have been using the below code to access information via CDO. All
works fine on my outlook and many other users, however there are some users that when they open my form their Outlook hangs. A seperate Outlook process appears in task manager and it doesn't matter how long i leave it the code never continues. If the process is killed the CDO access returns a VBSript error. "Error in lonon: - 2147024891 Collaberation Data Objects - E_Accessdenied(80070005)" Can anyone help with any suggestions. I'm not a developer and i'm quiet new to outlook coding so i would be grateful for simplistic answers. Thanks Outlook version = 2002 sp2 Exchange 5.5 ****************************************************************************** Function OpenMapiSession() on error resume next 'Start the CDO code to find a match. Set cdoSession = CreateObject("Mapi.session") cdoSession.Logon ,,false,false,0 'Use the existing Outlook session. if err.number <> 0 then msgbox "ERROR in logon: " & err.number & vbCRLF & err.description Set cdoAddrEntry = cdoSession.CurrentUser if err.number <> 0 then msgbox "ERROR in logon: " & err.number & vbCRLF & err.description 'Get data from Session.CurrentUser. MapiSession = 1 PresentUser = cdoAddrEntry.fields(cdo_FirstName) & " " & cdoAddrEntry.fields(cdo_Surname) UserTelNumber = cdoAddrEntry.fields(cdoPR_Business_Telephone_Number) RequestersDisplayName = cdoAddrEntry.fields(CdoPR_DISPLAY_NAME) Item.UserProperties.find("ImplementerName").value = PresentUser End Function ****************************************************************************** |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Have you checked to see whether CDO is indeed installed on these machines?
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Hoppers" <peter.hopkin@abbey.com> wrote in message news:28f0c171.0409070651.7c23f60e@posting.google.com... >I have been using the below code to access information via CDO. All > works fine on my outlook and many other users, however there are some > users that when they open my form their Outlook hangs. > > A seperate Outlook process appears in task manager and it doesn't > matter how long i leave it the code never continues. > If the process is killed the CDO access returns a VBSript error. > > "Error in lonon: - 2147024891 > Collaberation Data Objects - E_Accessdenied(80070005)" > > Can anyone help with any suggestions. > > I'm not a developer and i'm quiet new to outlook coding so i would be > grateful for simplistic answers. > > Thanks > > Outlook version = 2002 sp2 > Exchange 5.5 > > ****************************************************************************** > Function OpenMapiSession() > on error resume next > 'Start the CDO code to find a match. > Set cdoSession = CreateObject("Mapi.session") > cdoSession.Logon ,,false,false,0 'Use the existing Outlook session. > if err.number <> 0 then msgbox "ERROR in logon: " & err.number & > vbCRLF & err.description > Set cdoAddrEntry = cdoSession.CurrentUser > if err.number <> 0 then msgbox "ERROR in logon: " & err.number & > vbCRLF & err.description > 'Get data from Session.CurrentUser. > MapiSession = 1 > PresentUser = cdoAddrEntry.fields(cdo_FirstName) & " " & > cdoAddrEntry.fields(cdo_Surname) > UserTelNumber = cdoAddrEntry.fields(cdoPR_Business_Telephone_Number) > RequestersDisplayName = cdoAddrEntry.fields(CdoPR_DISPLAY_NAME) > Item.UserProperties.find("ImplementerName").value = PresentUser > End Function > ****************************************************************************** |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Hello,
Two Outlook 2003 users at my company are having the same problem. My code is similar (if not exactly the same--it is from a book example). Set oCDOSession = application.CreateObject("MAPI.Session") oCDOSession.Logon "", "", False, False, 0 http://support.microsoft.com/?kbid=177630 sounded like it might be the problem, but changing the Logon to oCDOSession.Logon "", "", False, False, 0, True did not fix the problem (although it still works on my computer). I did check to make sure that the CDO component of Outlook 2003 was installed (via the MS Office 2003 Install). I have the appcompat.txt that MS created because of the error. Any help is greatly appreciated. I haven't found any other possible solutions by Googling yet. Thank you, Roy "Hoppers" <peter.hopkin@abbey.com> wrote in message news:28f0c171.0409070651.7c23f60e@posting.google.com... > I have been using the below code to access information via CDO. All > works fine on my outlook and many other users, however there are some > users that when they open my form their Outlook hangs. > > A seperate Outlook process appears in task manager and it doesn't > matter how long i leave it the code never continues. > If the process is killed the CDO access returns a VBSript error. > > "Error in lonon: - 2147024891 > Collaberation Data Objects - E_Accessdenied(80070005)" > > Can anyone help with any suggestions. > > I'm not a developer and i'm quiet new to outlook coding so i would be > grateful for simplistic answers. > > Thanks > > Outlook version = 2002 sp2 > Exchange 5.5 > > **************************************************************************** ** > Function OpenMapiSession() > on error resume next > 'Start the CDO code to find a match. > Set cdoSession = CreateObject("Mapi.session") > cdoSession.Logon ,,false,false,0 'Use the existing Outlook session. > if err.number <> 0 then msgbox "ERROR in logon: " & err.number & > vbCRLF & err.description > Set cdoAddrEntry = cdoSession.CurrentUser > if err.number <> 0 then msgbox "ERROR in logon: " & err.number & > vbCRLF & err.description > 'Get data from Session.CurrentUser. > MapiSession = 1 > PresentUser = cdoAddrEntry.fields(cdo_FirstName) & " " & > cdoAddrEntry.fields(cdo_Surname) > UserTelNumber = cdoAddrEntry.fields(cdoPR_Business_Telephone_Number) > RequestersDisplayName = cdoAddrEntry.fields(CdoPR_DISPLAY_NAME) > Item.UserProperties.find("ImplementerName").value = PresentUser > End Function > **************************************************************************** ** |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

