Hi All,
I am trying to delete an email attachment (pdf document) right after an email was successfully send and getting the following error message:
The process cannot access the file (filename) because it is being used by another process.
If File.Exists(strName) Then
MessageBox.Show("File found: " + strName)
Try
File.Delete(strName)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End If
Any ideas?
Thank you,
Daniel