I have successfully managed (with help from forums) to write some code to send a report to Outlook, but the security dialog box in Outlook keeps appearing requiring user intervention.
I have found various bits of code on the system, but they all seem to be packages that you have to pay for.
I am using Outlook 2010 - is there some code that I can write into my Access VBA module that will either automate the clicking of the Allow button or stop the dialog box from appearing altogether when the report runs.
The report is being called from the Task Scheduler and it rather defeats the objective if someone needs to be at the desk to click Allow in order for the report to be sent.
Any guidance or advice, gratefully received.
Many thanks
current code in Access which is working but brings up Outlook Security Dialog box
I have found various bits of code on the system, but they all seem to be packages that you have to pay for.
I am using Outlook 2010 - is there some code that I can write into my Access VBA module that will either automate the clicking of the Allow button or stop the dialog box from appearing altogether when the report runs.
The report is being called from the Task Scheduler and it rather defeats the objective if someone needs to be at the desk to click Allow in order for the report to be sent.
Any guidance or advice, gratefully received.
Many thanks
current code in Access which is working but brings up Outlook Security Dialog box
Code:
Public Function ReviewDate()
Dim TR As String
Dim criteria As String
Dim trnum As Integer
trnum = DCount("[Date for Review]", "qryTrainingDueReviewDate")
If trnum > 0 Then
DoCmd.SendObject acSendReport, "RptTrainingDueReviewDate", acFormatPDF, "abc@emailaddress", , , "Outstanding Review Dates", "Please find list of outstanding or due review dates for various training courses", False
Else
DoCmd.SendObject , , , "abc@emailaddress", , , "Review Dates", "There are no training records needing reviewing", False
End If
End Function