Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
AVAYA CMS Scripting through Excel VBA
Private Function CMSGetReport(sServerIP As String, iACD As Integer,
sReportName As String, sProperty1Name As String, sProperty1Value As String, sProperty2Name As String, sProperty2Value As String, sExportName As String) As Boolean Dim cvsApp As CVS.cvsApplication Dim cvsConn As CVSCN.cvsConnection Dim cvsSrv As CVSUPSRV.cvsServer Dim Rep As CVSREP.cvsReport Dim Info As Object, Log As Object, b As Object Set cvsApp = New CVSUP.cvsApplication If cvsApp.CreateServer(getusername(sServerIP), "", "", sServerIP, False, "ENU", cvsSrv, cvsConn) Then If cvsConn.Login(getusername(sServerIP), getpassword(sServerIP), sServerIP, "ENU") Then CMSGetReport = False On Error Resume Next cvsSrv.Reports.ACD = iACD Set Info = cvsSrv.Reports.Reports(sReportName) If Info Is Nothing Then If cvsSrv.Interactive Then MsgBox "The Report " & sReportName & " was not found on ACD" & iACD & ".", vbCritical Or vbOKOnly, "CentreVu Supervisor" Else Set Log = CreateObject("CVSERR.cvslog") Log.AutoLogWrite "The Report " & sReportName & " was not found on ACD" & iACD & "." Set Log = Nothing End If Else b = cvsSrv.Reports.CreateReport(Info, Rep) If b Then Debug.Print Rep.SetProperty(sProperty1Name, sProperty1Value) Debug.Print Rep.SetProperty(sProperty2Name, sProperty2Value) ' Debug.Print Rep.SetProperty(sProperty3Name, sProperty3Value) b = Rep.ExportData(sExportName, 9, 0, True, False, True) Rep.Quit CMSGetReport = True If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID Set Rep = Nothing End If End If Set Info = Nothing End If End If End Function I got the above fuction from http://www.dbforums.com/archive/inde...t-1003776.html. What it does is, it extracts reports from AVAYA CenterVu Supervisor 9.0 software used by call centers. But when I used it in excel VBA, it gives me compile error "User-defined type not defined in the first line "Dim cvsApp As CVS.cvsApplication" when I try to call the function see my code below. More info: I searched few files on my comp in the C:\Program Files\Avaya\CentreVu Supervisor 9.0 directory and go to know that cvsAPP is an .exe file cvsConn is a .dll file cvsSrv is an .exe file CVSREP is an .exe file Sub a() Call CMSGetReport("172.18.3.60", 1, "Upstream Stats Rpt", "Date(s)", "03/01/06--1", "Split Numbers", "71;72;74;79;82;83", "m:\ReportsAutomation\abc.xls") End Sub How can I get rid of the error? Note: The above function might not display properly due to word wrap |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Dashboards Without VBA Scripting? | Charts and Charting in Excel | |||
Excel Dashboard without VBA Scripting? | Excel Discussion (Misc queries) | |||
Scripting in Excel 2007 | Excel Discussion (Misc queries) | |||
Excel scripting,programming | New Users to Excel | |||
is excel by itself enough to do scripting? | Excel Programming |