Not sure if this fits the Excel forum, but here goes...
I have the below script which creates a txt file but am needing for it to add yesterday's date to the end of the filename.
Example: "My Saved Report 2017-10-26.txt" (if today's date is October 27, 2017)
Thank you in advance for your help
I have the below script which creates a txt file but am needing for it to add yesterday's date to the end of the filename.
Example: "My Saved Report 2017-10-26.txt" (if today's date is October 27, 2017)
Code:
'LANGUAGE=ENU
'SERVERNAME=xx.xx.xx.xx
Public Sub Main()
On Error Resume Next
cvsSrv.Reports.ACD = 1
Set Info = cvsSrv.Reports.Reports("Historical\Designer\MultiSkill Daily")
If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "The report Historical\Designer\Multiskill Interval was not found on ACD 1.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
Else
Set Log = CreateObject("ACSERR.cvsLog")
Log.AutoLogWrite "The report Historical\Designer\Multiskill Interval was not found on ACD 1."
Set Log = Nothing
End If
Else
b = cvsSrv.Reports.CreateReport(Info,Rep)
If b Then
Rep.Window.Top = 1245
Rep.Window.Left = 20265
Rep.Window.Width = 22335
Rep.Window.Height = 9660
Rep.SetProperty "Splits/Skills","152"
Rep.SetProperty "Dates","-1"
b = Rep.ExportData("S:\Call Center\WFM Reporting\ScriptKeeper\Data Warehouse\Script Output\My Saved Report.txt", 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
'## cvs_cmd_end
End Sub
Thank you in advance for your help