我正在尝试从VB6程序中通过Outlook发送电子邮件。到目前为止一切正常,我的邮件发送成功。我想给收件人发送邮件正文中的一个链接,但是,它会将他们发送到一个网络目录。我好像在邮件正文里找不到超链接。
到目前为止,我发送电子邮件的代码如下所示:
Dim outlookApp As Outlook.Application
Dim resultsEmail As Outlook.MailItem
Set outlookApp = CreateObject("Outlook.Application")
Set resultsEmail = Outlook.CreateItem(olMailItem)
With resultsEmail
.To = addressee
.Subject = emailSubject
.Body = "Results are available here: " & 'somehow put in a hyperlink
.Send
End With
我尝试使用VB6可怕的引号转义插入一个HTML链接,希望Outlook能神奇地解决这个问题:
"<a href" & ch=" & chr(34) & "directoryLocation" & chr(34) & ">Link text</a>"
但它不会创建超链接,只是将生成的文本放在电子邮件正文中:
<a href="url">Link text</a>
如何在生成的电子邮件中获取链接?