如果想在邮件中附带软件的打开链接,那么我们可以使用超链接来实现:
1.规范软件存放位置或者快捷键存放位置和名称;
2.在自动发邮件的时候,插入超链接。
这里的难点是怎么在发邮件的时候把打开软件的链接放入到邮件中?
结合之前的文章:
调用Outlook发送邮件-附带签名[Access软件网]
http://www.accessoft.com/article-show.asp?id=17510
我们可以在签名之前加入打开链接的HTML:
href="目标链接">Open the Software
函数:
Public Function OutlookSendEmail(ToAddress As String, Subject As String, Body As String, Optional Attachment As String = "", Optional CC As String = "", Optional BCC As String = "", Optional EmailPreview As Boolean = False)
Dim objOutlook As outlook.Application
Dim objMail As MailItem
Set objOutlook = New outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)
Dim strSignature As String
With objMail
.Display
strSignature = .HTMLBody
strSignature = "
Open the Software
" & strSignature
.To = ToAddress '收件人
.CC = CC '抄送
.BCC = BCC '密件抄送
.Subject = Subject '标题
.Body = Body '正文
.HTMLBody = .HTMLBody & vbCrLf & strSignature
If Attachment <> "" Then .Attachments.Add Attachment '附件
If Not EmailPreview Then .Send '发送
End With
MsgBox "发送成功!"
End Function
在这个函数中,我们是调用的用户桌面,命名为Main的快捷方式。在邮件中点击:Open the software 即可打开软件。