Example
| Option Explicit Option Compare Text Sub Main Dim Arr() As String Dim x As Integer Dim hnd As Integer, OutputFileName As String Const TempPath As String = "C:\temp\" If HtmGetFileCount() > 0 Then Debug.Print "Number of files: " & HtmGetFileCount() ReDim Arr(0) As String Arr() = HtmGetFileList For x = LBound(Arr) To UBound(Arr) Debug.Print Arr(x) 'incoming name OutputFileName = TempPath & Mid$(Arr(x), InStrRev(Arr(x), "\") +1) Debug.Print OutputFileName 'saved file name hnd = FreeFile() Open OutputFileName For Output As #hnd Print #hnd, ParentRequest.Files(x + 1).ReadString(ParentRequest.Files(x + 1).Size) ' index base = 1 in ParentRequest object Close #hnd Next End If End Sub
|