I'm trying to set up to have an Access application automatically start up at a predefined time using the scheduler, compile and send out reports each morning to people on our LAN.....but a message box come up requiring me to acknowledge it's OK before sending. Is there any way to get around that message box....without having to pay for a digital ID? I understand it's for security reasons.....but it's my own program doing the sending! Is there a way I can log on or something???? This message box defeats the purpose of trying to automate these reports so each user isn't spending time having to open and compile them individually.
Details of my test code and the message box below.
Public Sub SendMail()
Dim appOutlook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Set appOutlook = CreateObject("Outlook.Application")
Set MailOutLook = appOutlook.CreateItem(olMailItem)
With MailOutLook
.To = "emailname@address.net"
.Subject = "Name of Report"
.Attachments.Add "Path\Filename"
.Send
End With
End Sub
Instead of just sending, a message box comes up with the following....
A program is trying to send mail using Item.Send
A program is trying to automatically send an e-mail message using a Microsoft Visual Basic Application (VBA) command, Item.Send, from within Microsoft Outlook. If you want this program to send this message, click Yes. To stop the program, click No. If you are unsure which program is sending the message or why the message is being sent, you should click No to help avoid the possible spread of viruses.
Note When this message is displayed, the Yes button is not available for five seconds.
Any help anyone could provide would be greatly appreciated!
Details of my test code and the message box below.
Public Sub SendMail()
Dim appOutlook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Set appOutlook = CreateObject("Outlook.Application")
Set MailOutLook = appOutlook.CreateItem(olMailItem)
With MailOutLook
.To = "emailname@address.net"
.Subject = "Name of Report"
.Attachments.Add "Path\Filename"
.Send
End With
End Sub
Instead of just sending, a message box comes up with the following....
A program is trying to send mail using Item.Send
A program is trying to automatically send an e-mail message using a Microsoft Visual Basic Application (VBA) command, Item.Send, from within Microsoft Outlook. If you want this program to send this message, click Yes. To stop the program, click No. If you are unsure which program is sending the message or why the message is being sent, you should click No to help avoid the possible spread of viruses.
Note When this message is displayed, the Yes button is not available for five seconds.
Any help anyone could provide would be greatly appreciated!