How can I turn off the "This may be a virus" alert?
Posted on 2006-04-18
I have this outlook script...
Private Sub CommandButton1_Click()
'Create Email Button
Dim X As Integer
Dim strFile As String
Dim strRTVNum As String
Dim myOlApp As New Outlook.Application
Dim myItem As Outlook.MailItem
Dim myAttachments As Outlook.Attachments
Set FileSys = New FileSystemObject
Set fso = CreateObject("Scripting.FileSystemObject")
Set Folder = fso.GetFolder("E:\RTV\Batch")
Set Files = Folder.Files
On Error Resume Next
For Each File In Files
Set myItem = myOlApp.CreateItem(olMailItem)
Set myAttachments = myItem.Attachments
strFile = File.Name & ""
For X = 1 To Len(strFile)
If Mid(strFile, X, 1) = " " Then
strRTVNum = Left(strFile, X - 1)
myItem.To = "firstname.lastname@example.org"
myItem.Subject = strRTVNum
myItem.Body = ""
myAttachments.Add "E:\RTV\Batch\" + strFile, olByValue, 1, ""
When I send it, I get this ALERT this may be a virus trying to automatically send out email through your system. Then after about 8 seconds I have a YES button that becomes activated and I can click it to send the email. Well, as you can assume, there is often about 80 files that I am having to send using this method and clicking YES every 8 seconds is driving me nuts. How do I get around this?