Results 1 to 1 of 1
2004-06-17, 18:49 #1
- Join Date
- Jun 2001
- New York, New York, Lebanon
- Thanked 1 Time in 1 Post
How To Avoid the Virus Checker (OL 2003 and <)
<img src=/S/hello.gif border=0 alt=hello width=25 height=29> Loungers
OK when I use this like:
oMessage.Attachments.Item(lCounter).SaveAsFile sSavePath & .Item(lCounter).FileName
and the file being saved happens to be infected with some bad stuff, the Virus Checker, in my case Norton Anti virus 2003, will fire with a message and some times the attached file will be deleted by the Anti virus.
So, the line will fail because the file can't be saved after its deleted.
So I added this:
On Error Resume Next
oMessage.Item(lCounter).SaveAsFile sSavePath & .Item(lCounter).FileName
lErrorNum = Err.Number
If lErrorNum <= 0 Then
lErrorNum = 0
(Sorry need to learn how to write the code so that it will be readable)
I am using this < or = to 0 because in the immediate window I was seeing error numbers like:
but some were not 10-digit long, but all of them were negative numbers.
Am I opening a Pandora's chest?
What would be a better way to deal with this issue?
Wassim<img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>