我在 Microsoft Access 中有一组记录,我正试图通过电子邮件发送这些记录。电子邮件功能很好用。除了每次准备发送消息时都会弹出一条警告消息,并且用户必须为每封发送的电子邮件单击“允许”或“拒绝”。我查找了一种解决方法,并一直在关注它的教程:
http ://www.everythingaccess.com/tutorials.asp?ID=Outlook-Send-E-mail-Without-Security-Warning 。
我的问题是,当我将消息放入函数时,它总是返回 false,并且消息失败。任何帮助,将不胜感激。
Dim sendMail As Boolean
Dim strMessage As String
strMessage = Some Message
sendMail = FnSafeSendEmail(![Email Id], "Subject", strMessage)
整个“FnSafeSendEmail”功能可以在提供的链接中找到。这些是参数。
Public Function FnSendMailSafe(strTo As String, _
strCC As String, _
strBCC As String, _
strSubject As String, _
strMessageBody As String, _
Optional strAttachments As String) As Boolean
在函数的这一行抛出错误“对象不支持此属性或方法”。
Dim blnSuccessful As Boolean
blnSuccessful = objOutlook.FnSendMailSafe(strTo, strCC, strBCC, _
strSubject, strMessageBody, _
strAttachmentPaths)