Eliminate Window MEssage

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a macro that e-mails one excel sheet. However, everytime I click the
macro I got the following window message from outlook:

"A program is trying to automatically send e-mail on your behalf.
Do you want to allow this?
Is this is unexpected, It may be a virus and you should choose "NO"

SInce the e-mail are among my peers in the company only I click "YES" always.
Is there is any way to eliminate this windows message in the program (see
below).

Thanks in advance.

Maperalia


'***************************************************
'Start E-mail File
sub Send_email()
Dim wb As Workbook
Dim strdate As String
strdate = Format(Now, "dd-mm-yy h-mm-ss")
Application.ScreenUpdating = False
ActiveSheet.Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "Part of " & ThisWorkbook.Name & " " & strdate & ".xls"
.SendMail "(e-mail address removed)", "Requesting a Proposal Number"
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
Application.ScreenUpdating = False
'ActiveWorkbook.Close


'***********************************************
'End E-mail File


End Sub
 
Back
Top