我试图在MS Access中生成一些自动发送的电子邮件,我需要在发送之前签署该电子邮件。我想以编程方式执行此操作,但我遇到了尝试执行功能区按钮的问题" Sign"
这是我发送电子邮件的子
Public Sub SendEmail(ByRef sTo As String, ByRef sSubject As String, ByRef sBody As String, Optional sOnBehalfOf As String = "", Optional sCc As String = "", Optional sBcc As String = "")
Dim bHtml As Boolean
If (InStr(1, sBody, "<b>") Or InStr(1, sBody, "<font>") Or InStr(1, sBody, "<td>") Or InStr(1, sBody, "<br>")) Then bHtml = True
With Outlook.Application.CreateItem(olMailItem)
.SentOnBehalfOfName = sOnBehalfOf
.To = sTo
.CC = sCc
.BCC = sBcc
.Subject = sSubject
If (bHtml) Then
.HTMLBody = sBody
Else
.Body = sBody
End If
.Display
SendKeys ("^{Enter}")
End With
End Sub
之后.Display我需要点击&#34; Sign&#34;新创建的电子邮件上的按钮,然后是SendKeys(&#34; ^ {Enter}&#34;)。我需要以编程方式点击&#34;签署&#34;因为电子邮件有超链接,并以html格式化。
编辑:通过签名我的意思是&#34;签署&#34;将对电子邮件进行数字签名的按钮
答案 0 :(得分:0)