【问题标题】:VBA Issue when connecting to Avaya CMS application连接到 Avaya CMS 应用程序时出现 VBA 问题
【发布时间】:2016-01-07 15:00:07
【问题描述】:

我需要一些帮助:( 好的,这就是我想要做的,打开 excel 并从 CMS(呼叫管理系统)运行间隔报告((“Historical\Designer\GSD CR Summary Interval Report”)。 当我打开我的 excel 文件时,我将选择 CMS 搜索的时间/日期范围和技能。请看下图: 填写完所有必需的字段后,单击生成报告,VBA 将接管,清除 CMS RawData 中的所有数据并粘贴新数据。我不断收到一个未定义的错误,无法理解它......代码是:`'

Created by Keith Carpenter
06/01/2016


Dim cvsApp As New ACSUP.cvsApplication
Dim cvsConn As New ACSCN.cvsConnection
Dim cvsSrv As New ACSUPSRV.cvsServer
Dim Rep As New ACSREP.cvsReport
Dim Info As Object, Log As Object, b As Object


'This method is the main function that prepare the extraction from CMS to    load in Excel
Public Sub ReportInterval()
On Error GoTo ErrHandler:

Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Unhide_Sheets

'Clean the MTD sheet
Sheets("CMS_RawData").Select
Cells.Select
Selection.ClearContents
Range("A1").Select

'Checking if current CMS session is opened
Set cvsSrv = cvsApp.Servers(1)
Sheets("SLA Dashboard").Select

'Select first skill in the list
Range("F8").Select
Dim sSkills As String
Dim sDate As String
Dim sTimes As String

'The report will run for each skills listed in the first table
For Each c In Sheets("Settings").Range("A2:A26")
    If (Not IsEmpty(c.Value)) Then
        sSkills = sSkills & ";" & c.Text
    End If
Next c

If ActiveSheet.Range("F6").Text = ActiveSheet.Range("F7").Text Then
    sDate = ActiveSheet.Range("F6")
Else
    sDate = ActiveSheet.Range("F6") & "-" & ActiveSheet.Range("F7")
End If

  If ActiveSheet.Range("F4").Text = ActiveSheet.Range("F5").Text Then
    sTimes = ActiveSheet.Range("F5")
Else
    sTimes = ActiveSheet.Range("F4") & "-" & ActiveSheet.Range("F5")
End If


'Call GSD CR Summary Interval Report
Call doRep("Historical\Designer\GSD CR Summary Interval Report", Right(sSkills, Len(sSkills) - 1), sDate, sTimes)

'Copy the content of the clipboard in Excel
Sheets("CMS_RawData").Select
Range("A1").Select

Selection.PasteSpecial

'Close the connection
Call logout


Exit Sub

     ErrHandler:
    If Err.Number <> 91 Then
    MsgBox "Please log in to CMS", vbOKOnly, "Error"
End If
 Resume Next
 End Sub

这是我收到的错误:

这里的任何帮助将不胜感激。`

【问题讨论】:

  • 该错误通常表明您需要在 VB 项目中添加引用(通过工具 >> 引用)。 VBA 对 Avaya 相关对象一无所知,因此您需要为这些类型添加适当的库。
  • 在过去的两年里,我一直在通过 Excel/Avaya 自动生成报告,而 Tim 一针见血。正如他所建议的,您需要在 Excel 中访问 VB 项目中的引用,并添加:Application ComponentConnection ComponentReport ComponentServer Component。如果您需要进一步的帮助,请告诉我。

标签: vba excel content-management-system avaya


【解决方案1】:

只需将Dim cvsConn as New ACSCN.cvsConnection 更改为Dim cvsConn as Object

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-08-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-18
    • 2023-02-01
    • 2020-11-26
    • 1970-01-01
    相关资源
    最近更新 更多