I have not attempted to debug your code but you have
andFileName = folderPath & Attach.FileName
you should have insteadAttach.SaveAsFile (folderPath & Attach.FileName)
andFileName = folderPath & Item.Subject & Right(Attach.FileName, InStrRev(Attach.FileName, Chr(46)))
The subject may be unique, but this will not work as it stands if the subject contains illegal filename characters.Attach.SaveAsFile (folderPath & Item.Subject & Right(Attach.FileName, InStrRev(Attach.FileName, Chr(46))))