我在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
错误“Object不支持此属性或方法”会抛出此函数行。
Dim blnSuccessful As Boolean
blnSuccessful = objOutlook.FnSendMailSafe(strTo, strCC, strBCC, _
strSubject, strMessageBody, _
strAttachmentPaths)
答案 0 :(得分:0)
解决。我不得不在Microsoft Outlook的信任中心禁用宏的安全检查。