Hi can anyone help? I have the following line of code that looks up files with various different paths then emails them.
varAttach(x - 1) = Email("Path"
& " " & Email("Account name"
& " " & Email("Account Number" & x) & " September 2003.xls"
End If
Next x
x = 0
Call SendNotesMail("Summary Information ", varAttach, varpeeps, "Please see the attached" & Chr(13) & Chr(13) & "If you have any queries please contact:" & Chr(13) & "xxxxxx" & Chr(13) & "xxxxxx" & Chr(13) & "Telephone : 0116 2565665" & Chr(13))
Email.MoveNext
Problem is some files aren't generated every month and therefore not there. I need to know a line of code that will ignore the fact that the file isn't there and will continue on with the loop instead of giving an error message each time it can't find a file.
varAttach(x - 1) = Email("Path"
End If
Next x
x = 0
Call SendNotesMail("Summary Information ", varAttach, varpeeps, "Please see the attached" & Chr(13) & Chr(13) & "If you have any queries please contact:" & Chr(13) & "xxxxxx" & Chr(13) & "xxxxxx" & Chr(13) & "Telephone : 0116 2565665" & Chr(13))
Email.MoveNext
Problem is some files aren't generated every month and therefore not there. I need to know a line of code that will ignore the fact that the file isn't there and will continue on with the loop instead of giving an error message each time it can't find a file.