
Dim fso, folder, files 
Set fso = CreateObject("Scripting.FileSystemObject")  
 
Set folder = fso.GetFolder("d:\Apps\Facilitor\Fplace5i\CUST\PCHH\export\EXACT")  
Set files = folder.Files    
For each folderIdx In files
   If InStrRev(folderIdx.Name, ".xml") > 0 Then
      Set objEmail = CreateObject("CDO.Message")
      objEmail.From = "no_reply@pchh.facilitor.nl"
      objEmail.To = "fa@pch-dienstengroep.nl;a.egberink@sgfacilitor.nl"
      objEmail.Subject = "Facilitor: Bestand met inkoopfacturen (Holding)"
      objEmail.Textbody = "Automatisch verzonden bestand van geexporteerde facturen."
      objEmail.AddAttachment "d:\Apps\Facilitor\Fplace5i\CUST\PCHH\export\EXACT\" + folderIdx.Name
      objEmail.Send
   End If
Next  


