I have the below script that keeps receiving
Compilation Error Line 16 - Expected Sub
I'm not seeing what's causing this.
This script is run by acscript for an Avaya phone system. It's probable the ## cvs_cmd_begin
and ## cvs_cmd_end
are replaced with something else by the engine.
'SERVERNAME=123.45.67.89
Public Sub Main()
'## cvs_cmd_begin
' =========================================================
' ERROR ERROR ERROR
' If you're having trouble running a script make sure it's Encoding = UTF-8 (use Notepad++)
' =========================================================
' On Error Resume Next
SaveFolder = "K:\Telephony\ACD Automation\AutoReport.AgentInterval\Daily 20200124\"
SaveFile = "Agent.Interval_20200124_12345.txt"
cvsSrv.Reports.ACD = 1
Set Info = cvsSrv.Reports.Reports("Historical\Designer\A.Agent Interval")
If Info Is Nothing Then
Exit
Else
b = cvsSrv.Reports.CreateReport(Info,Rep)
If b Then
Rep.TimeZone = "default"
Rep.SetProperty "Agent", "12345"
Rep.SetProperty "Date", "1/24/2020"
Rep.SetProperty "Times", "07:00-20:45"
b = Rep.ExportData(SaveFolder & SaveFile, 9, 0, False, True, True)
Rep.Quit
Set Rep = Nothing
End If
End If
Set Info = Nothing
'## cvs_cmd_end
End Sub