Код для генерации уникального имени файла
? BEGIN CALLOUT A ? Call the GenFileName function to create a unique filename for the report. strFileName = GenFileName(«ApplyReg») ? END CALLOUT A ? BEGIN CALLOUT B ? Create a unique time-stamped filename for the .csv file. Function GenFileName(prefix) Dim dtDate,strYear,strMonth,strDay,strDate Dim dtNow,strHour,strMinute,strSecond,strTime dtDate = Date() strYear = Mid(Year(dtDate),3) strMonth = PadZero(Month(dtDate)) strDay = PadZero(Day(dtDate)) strDate = strYear & strMonth & strDay & «-» dtNow = Now() strHour = PadZero(Hour(dtNow)) strMinute = PadZero(Minute(dtNow)) strSecond = PadZero(Second(dtNow)) strTime = strHour & strMinute & strSecond GenFileName = prefix & «-» & strDate & strTime & «.csv» End Function ? END CALLOUT B