Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that emails monthly reports to several department heads.
Does anyone know if there is a way to prevent the message "A program i tyring to automatically send email on your behalf ... if this i unexpected it could be a virus" ? I have to press "yes" each time, and the macro sends reports to man addresses. I understand the need for this security, however I would think there i some way to advise the computer "it's okay, it's me". Any assistance would be appreciated. The code I use follows: Sub SendReports() Dim ol As Object, myItem As Object Set ol = CreateObject("outlook.application") MyText = Range("Email_Comment").Value Set myItem = ol.CreateItem(olMailItem) myItem.To = "email address" myItem.Subject = "Subject Line" myItem.Body = MyText myItem.Body = myItem.Body & "" & Chr(13) & Chr(13) Set myAttachments = myItem.Attachments myAttachments.Add "Path name of file to attach" myItem.Send ' Other addresses and attachments are entered here Set ol = Nothing End Su -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sending a Spreadsheet as an Email Attachment vs. Imbedded in Email | Excel Discussion (Misc queries) | |||
Email Attachment | Excel Discussion (Misc queries) | |||
send wkbk as an email attachment with an email address copied from | Excel Discussion (Misc queries) | |||
email as attachment | New Users to Excel | |||
Attachment to an email | Excel Discussion (Misc queries) |