Hi!
I developed an email component for sending emails with attachments.A part of the code looks like this:
Code:
If oFSO.FolderExists(sFolder) Then
Set oFolder = oFSO.GetFolder(sFolder)
For Each oFile In oFolder.Files
If InStr(oFile.Name, "_" & user) > 0 Then
oMail.AddAttachment oFile.Path
FileSize = Format((FileLen(oFile) / 1024) / 1024)
SumSize = SumSize + FileSize
oFSO.DeleteFile (oFile)
End If
Next
End If
This is supposed to attach the files to the email and then to delete the files.The files are being sent,but if I check the folder where the files are supposed to be(from Windows),I see the that the files still exist.However,I cannot access the files(I get an Access denied error,even though I have the right permissions).How can I solve this problem?
Thanks in advance!