繁体   English   中英

为什么在尝试自动化 Avaya CMS 时使用 excel 2016 会出现错误?

[英]Why do i get an error using excel 2016 when trying to automate Avaya CMS?

我粘贴了下面的代码以从 Avaya CMS 中提取信息并将其直接粘贴到此工作表中,这工作得非常好,直到我们从 excel 2010 切换到 Excel 2016,现在它给了我这个错误:

“运行时错误‘-2147319783 (80028019)’:

自动化错误旧格式或无效类型库”

我不知道如何解决这个问题,如果有人能给我建议,将不胜感激。

Dim cvsApp As New ACSUP.cvsApplication
Dim cvsSrv As New ACSUPSRV.cvsServer
Dim Rep As New ACSREP.cvsReport
Dim Info As Object, Log As Object, b As Object
Dim logged As Boolean
Dim timevar As String

Public Sub CMS_REL()
Application.ScreenUpdating = 0
sk = "66"

Sheets("Per Teams").Activate
timevar = Range("F20")

Set cvsSrv = cvsApp.Servers(1)
Call doRep("Historical\Designer\Agent ACD Release (MultiSkill)", sk)


    Sheets("Released").Select
        Range("A:H").Select
            Selection.ClearContents
        Range("A1").Select
            ActiveSheet.Paste
        Range("A1").Select
    Sheets("Per Teams").Select



logout
Application.ScreenUpdating = 1


End Sub


Sub doRep(sReportName As String, ByVal sk As Integer)

On Error Resume Next
cvsSrv.Reports.ACD = 1
Set Info = cvsSrv.Reports.Reports(sReportName)
If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "The Report " & sReportName & " was not found on ACD 1", vbCritical Or vbOKOnly, "CentreVu Supervisor"
Else
Set Log = CreateObject("ACSERR.cvslog")
Log.AutoLogWrite "The Report " & sReportName & " was not found on ACD 1"
Set Log = Nothing
End If
Else
b = cvsSrv.Reports.CreateReport(Info, Rep)
If b Then
Debug.Print Rep.SetProperty("Splits/Skills", "64-72")
Debug.Print Rep.SetProperty("Dates", 0)
Debug.Print Rep.SetProperty("Times", "00:00-" & timevar)
b = Rep.ExportData("", 9, 0, True, True, True)
Rep.Quit
If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID
Set Rep = Nothing
End If
End If

Set Info = Nothing



End Sub

Sub logout()
Set Log = Nothing
Set Rep = Nothing
Set cvsSrv = Nothing
Set cvsApp = Nothing

End Sub

改变这一行

Dim cvsApp As New ACSUP.cvsApplication

对此

  Dim cvsApp As Object
  Set cvsApp = CreateObject("ACSUP.cvsApplication")

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM