Welcome to the fracta.net forum!

Share your coding ideas or ask questions.

Question Class not registered: CreateObject("ACSCN.cvsConnection")

More
3 years 2 months ago #736 by Dan
Hi,
I've been trying to solve this problem for a while now but not getting anywhere.
I currently have Windows 7 & Avaya CMS R17 and I'm running an excel file to connect to CMS and pull back multiple different reports, its all been working fine for years but now we're moving to CMS R19 and Windows 10 and problems have started.

There are no missing references, and I'm able to get the code to work if the CMS console is open and logged in, but that doesn't really help in my situation.

This is the line that's causing the error:
Code:
Set cmsConnection = CreateObject("ACSCN.cvsConnection")

Here is the full code:
Any help and pointers are appreciated .
Code:
Sub RefreshCMSData() Dim bCMSExtractActive As Boolean Dim sCMSReportPath As String Dim sCMSReportName As String Dim sCMSServer As String Dim iCMSACD As Integer Dim sCMSLogin As String Dim sCMSPassword As String Dim sCMSBackupServer As String Dim iCMSBackupACD As Integer Dim bCMSUseExistingCon As Boolean Dim sCMSBackupLogin As String Dim sCMSBackupPassword As String Dim bCMSLogOutAfterExport As Boolean Dim sCMSField1Heading As String Dim sCMSField1Parameter As String Dim sCMSField2Heading As String Dim sCMSField2Parameter As String Dim sCMSField3Heading As String Dim sCMSField3Parameter As String Dim sCMSExportPath As String Dim sCMSExportName As String Dim bCMSNullToZero As Boolean Dim bCMSIncludeLabels As Boolean Dim bCMSExportDurSecs As Boolean Dim sCMSImportAddress As String Dim sServer As String '------------------------------------------------------------------------------------ ' Clears vairables for next run '------------------------------------------------------------------------------------ sCMSReportPath = Empty sCMSReportName = Empty sCMSServer = Empty iCMSACD = Empty sCMSLogin = Empty sCMSPassword = Empty bCMSUseExistingCon = False sCMSBackupLogin = Empty sCMSBackupPassword = Empty bCMSLogOutAfterExport = False sCMSField1Heading = Empty sCMSField1Parameter = Empty sCMSField2Heading = Empty sCMSField2Parameter = Empty sCMSField3Heading = Empty sCMSField3Parameter = Empty sCMSExportPath = Empty sCMSExportName = Empty bCMSNullToZero = False bCMSIncludeLabels = False bCMSExportDurSecs = False sCMSImportAddress = Empty sServer = sCMSServer '------------------------------------------------------------------------------------ ' Assigns Vairables '------------------------------------------------------------------------------------ sCMSReportPath = "Historical\Designer\" sCMSReportName = "TestReportWin10" sCMSServer = " " iCMSACD = " " sCMSLogin = " " sCMSPassword = " " bCMSUseExistingCon = True sCMSBackupLogin = " " sCMSBackupPassword = " " bCMSLogOutAfterExport = False sCMSField1Heading = "Splits/Skills" sCMSField1Parameter = "5277" sCMSField2Heading = "Dates" sCMSField2Parameter = "08/01/2021" sCMSField3Heading = "Times" sCMSField3Parameter = "08:00-15:00" sCMSExportPath = " " sCMSExportName = "Test1.csv" bCMSNullToZero = False bCMSIncludeLabels = True bCMSExportDurSecs = True sCMSImportAddress = "" sServer = sCMSServer Call ExportCMSReport(ReportPath:=sCMSReportPath, ReportName:=sCMSReportName, _ myServer:=sServer, myACD:=iCMSACD, _ myLogin:=sCMSLogin, myPassword:=sCMSPassword, _ UseExistingConsole:=bCMSUseExistingCon, LogOutAfterExport:=bCMSLogOutAfterExport, _ Field1Heading:=sCMSField1Heading, Field1Parameter:=sCMSField1Parameter, _ Field2Heading:=sCMSField2Heading, Field2Parameter:=sCMSField2Parameter, _ Field3Heading:=sCMSField3Heading, Field3Parameter:=sCMSField3Parameter, _ ExportPath:=sCMSExportPath, ExportName:=sCMSExportName, _ NullToZero:=bCMSNullToZero, IncludeLabels:=bCMSIncludeLabels, ExportDurSecs:=bCMSExportDurSecs) End Sub Sub ExportCMSReport(ReportPath As String, ReportName As String, _ myServer As String, myACD As Integer, _ myLogin As String, myPassword As String, _ UseExistingConsole As Boolean, LogOutAfterExport As Boolean, _ Field1Heading As String, Field1Parameter As String, _ Field2Heading As String, Field2Parameter As String, _ Optional Field3Heading As String, Optional Field3Parameter As String, _ Optional Field4Heading As String, Optional Field4Parameter As String, _ Optional ExportPath As String, Optional ExportName As String, _ Optional NullToZero As Boolean, Optional IncludeLabels As Boolean, Optional ExportDurSecs As Boolean) Dim cmsReport As ACSREP.cvsReport 'acsRep.exe Dim iServer As Long Dim b1FieldComplete As Boolean Dim b2FieldComplete As Boolean Dim b3FieldComplete As Boolean Dim b4FieldComplete As Boolean Dim iNumFields As Integer 'On Error Resume Next Application.StatusBar = False '-------------------------------------------------------------------------------------------------------- ' Open the CMS Application, launches acsApp.exe '-------------------------------------------------------------------------------------------------------- Application.StatusBar = "Extracting CMS report " & iReportCounter & ": Setting application..." Set cmsApplication = CreateObject("ACSUP.cvsApplication") '-------------------------------------------------------------------------------------------------------- ' If a CMS Supervisor console is already open, the existing acsApp.exe is used. '-------------------------------------------------------------------------------------------------------- blnMyServerFound = False Set cmsServer = Nothing If UseExistingConsole = True Then Application.StatusBar = "Extracting CMS report " & iReportCounter & ": Looking for server... """ & myServer & """" For iServer = 1 To cmsApplication.Servers.Count If cmsApplication.Servers(iServer).Name = myServer _ And cmsApplication.Servers(iServer).Connection.User = myLogin Then blnMyServerFound = True Exit For End If Next iServer If blnMyServerFound = True Then Set cmsServer = cmsApplication.Servers(iServer) '''''' we set a reference to the server here Set cmsConnection = cmsServer.Connection End If End If '-------------------------------------------------------------------------------------------------------- ' If not connected to a server, log in '-------------------------------------------------------------------------------------------------------- If cmsServer Is Nothing Then Login: Set cmsServer = Nothing Set cmsServer = CreateObject("ACSUPSRV.cvsServer") cmsServer.Interactive = False Set cmsConnection = CreateObject("ACSCN.cvsConnection") If UseExistingConsole = True Then End If If cmsApplication.CreateServer(myLogin, myPassword, "", myServer, False, "ENU", cmsServer, cmsConnection) Then 'Stop If cmsConnection.Login(myLogin, myPassword, myServer, "ENU", "", False) Then End If End If End If 'Stop

Please Log in or Create an account to join the conversation.

Time to create page: 0.373 seconds
Powered by Kunena Forum