![]() |
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
|
|||
|
|||
![]()
Here is the code below; I have problems with some machines and not others,
see comments in the code thanks, Dominique sub item_open() dim oSession 'MAPI session dim strRetCode 'code to capture CDO success login 'clear error buffer err.clear on error resume next 'Use createobject to logon the CDO ' Need to use CDO to access access rights to MAPI folders set oSession = application.createobject("MAPI.Session") ----- this is where it fails on some machines. Those are Office 2000 or Office 2003 some have SP3 installed, one has SR1 (XP and windows 2000) ----- The error I get is -2147221005 Internal Application error if not err.number = 0 then msgbox err.number & " " & err.description end if 'clear error buffer err.clear on error resume next 'Logon using an existing MAPI session strRetCode=oSession.Logon("", "", false, false,0) 'error detected? if not err.number = 0 then msgbox "Could not establish CDO session" oSession.logoff Item_open = false set oSession = nothing strRetCode=0 exit sub end if etc... end sub |
Ads |
#2
|
|||
|
|||
![]()
Have you checked to see if those machines (a) have CDO 1.21 installed and (b) are running an anti-virus program that includes a script blocker to prevent OUtlook or CDO automation?
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Dominique Schroeder" wrote in message ... Here is the code below; I have problems with some machines and not others, see comments in the code thanks, Dominique sub item_open() dim oSession 'MAPI session dim strRetCode 'code to capture CDO success login 'clear error buffer err.clear on error resume next 'Use createobject to logon the CDO ' Need to use CDO to access access rights to MAPI folders set oSession = application.createobject("MAPI.Session") ----- this is where it fails on some machines. Those are Office 2000 or Office 2003 some have SP3 installed, one has SR1 (XP and windows 2000) ----- The error I get is -2147221005 Internal Application error if not err.number = 0 then msgbox err.number & " " & err.description end if 'clear error buffer err.clear on error resume next 'Logon using an existing MAPI session strRetCode=oSession.Logon("", "", false, false,0) 'error detected? if not err.number = 0 then msgbox "Could not establish CDO session" oSession.logoff Item_open = false set oSession = nothing strRetCode=0 exit sub end if etc... end sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Autofill not working in Terminal Session | jcharde | Outlook - General Queries | 0 | February 22nd 06 10:27 PM |
mapi cdo service | [email protected] | Outlook - General Queries | 8 | February 20th 06 03:33 PM |
limit number of messages sent in 1 session | Andrew Zenz | Outlook - General Queries | 2 | February 15th 06 07:53 PM |
MAPI setup | Jo | Outlook - Installation | 2 | February 14th 06 08:51 PM |
How to use MAPI with an ISP | RGR. Jim | Outlook - Installation | 2 | February 1st 06 08:57 PM |