【发布时间】:2016-01-18 22:27:18
【问题描述】:
我有一个使用 VBA 发送电子邮件的 Excel 电子表格:
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "This is email text, click the link <a href='C:\test.xlsm & Range("F" & ActiveCell.Row).Address'></a>"
On Error Resume Next
With OutMail
.To = "####"
.CC = ""
.BCC = ""
.Subject = "Sales Tracker: A New Task has been added to the tracker"
.HTMLBody = strbody & strbody2 & strbody3 & strbody4
.Send 'displays outlook email
'Application.SendKeys "%s" 'presses send as a send key
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
当用户点击活动行中的特定单元格时发送电子邮件。
我在电子邮件中包含带有超链接的 Excel 电子表格。
现在我想添加到超链接以包含用户单击的行的单元格引用。
这个想法是点击超链接时会打开电子表格,并将用户带到链接所指的行并突出显示它。
【问题讨论】: