我想创建一个带有独特可跟踪 URL 的签名。理想情况下,链接应该是这样的www.domain.com?Email=$EMAILADDRESS
其中 $EMAILADDRESS 是当前要发送到的电子邮件地址。如果有办法做到这一点,显然可以改变,其余的 URL 只是告诉网站数据是什么。
这在 Outlook 中可行吗?
答案1
当您单击“发送”按钮时,您可以触发运行宏,然后直接修改电子邮件的内容。
作为十人首发:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim email As String
' Don't stop for errors
On Error Resume Next
' Get STMP email address of first recipient of email.
email = Item.Recipients.Item(1).PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x39FE001E")
' If that fails, then use blank ("") instead
If Err.Number <> 0 Then email = ""
' Work out what type of email it is and then replace $EMAILADDRESS in
' the body to that of 'email'
Select Case Item.BodyFormat
Case olFormatHTML
Item.HTMLBody = Replace(Item.HTMLBody, "$EMAILADDRESS", email)
Case olFormatRTF
Item.RTFBody = Replace(Item.RTFBody, "$EMAILADDRESS", email)
Case Else
Item.Body = Replace(Item.Body, "$EMAILADDRESS", email)
End Select
On Error Goto 0
End Sub
如果您$EMAILADDRESS
输入您的电子邮件(例如您的签名),那么它将被发件人的电子邮件地址替换。