Originally Posted by
June7
Are you using SendObject?
As long as I keep MS virus protection up to date, I don't get the warning.
this is the script I use
Code:
' Add the CC recipient(s) to the message.
'Set objOutlookRecip = .Recipients.Add("name.name@email.com")
'objOutlookRecip.Type = olCC
' Add the BCC recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("name.name@email.com")
objOutlookRecip.Type = olCC
' Set the Subject, Body, and Importance of the message.
.Subject = "Team Reports"
.Body = "This is an unmonitored mailbox. Please send concerns to Name at name@name.com." & vbCrLf & vbCrLf
.Importance = olImportanceNormal 'Normal importance
' Add attachments to the message.
If Not IsMissing("C:\file.xlsx") Then
Set objOutlookAttach = .Attachments.Add("C:\file.xlsx")
End If
If Not IsMissing("C:\file2.xlsx") Then
Set objOutlookAttach = .Attachments.Add("C:\file2.xlsx")
End If
If Not IsMissing("C:\file3.xlsx") Then
Set objOutlookAttach = .Attachments.Add("C:\file3.xlsx")
End If
' Resolve each Recipient's name.
For Each objOutlookRecip In .Recipients
objOutlookRecip.Resolve
Next
' Should we display the message before sending?
If DisplayMsg Then
.Display
Else
.Save
.Send
End If
End With
'Set objOutlook = Nothing
End Sub