Dim fso, folder, files
Set fso = CreateObject("Scripting.FileSystemObject")

Set folder = fso.GetFolder("d:\Apps\Facilitor\CUST\UWVA\Export\KTO")
Set files = folder.Files
For each folderIdx In Files
   If InStrRev(folderIdx.Name, ".csv") > 0 Then
      Set objEmail = CreateObject("CDO.Message")
      objEmail.From = "no_reply@uwva.facilitor.nl"
      ' objEmail.To = "m.vanderheide@facilitor.nl"
      objEmail.To = "service@tevreden.nl"
      objEmail.Subject = "Facilitor: Wekelijkse aanlevering KTO-bestand"
      objEmail.Textbody = "Automatisch verzonden KTO-bestand."
      objEmail.AddAttachment "d:\Apps\Facilitor\CUST\UWVA\Export\KTO\" + folderIdx.Name
      objEmail.Send
   End If
Next
