如何编辑电子邮件中超链接的字体颜色?

How to Edit Font Colour of Hyperlink in Email?

我正在使用 Outlook 电子邮件模板,我在其中找到特定文本,然后将其替换为嵌入式超链接,然后将电子邮件发送出去。但是,当电子邮件发出时,超链接的字体颜色默认变为蓝色。

如何设置电子邮件发出后保留的字体颜色(黑色或白色)。

Sub Mail_Merge()
    Tme1 = Now()

    Application.ScreenUpdating = False
    On Error GoTo C:
    Dim oApp As Object, oMail As Object

    Set oApp = CreateObject("Outlook.Application")
    a = Sheet1.Range("B1048576").End(xlUp).Row

    For i = 2 To a

    Set oMail = oApp.CreateItemFromTemplate(Cells(i, 10))
    With oMail

    .To = Cells(i, 2)
    .Subject = Cells(i, 8)

    strfind = "X1X1X1"
    strLink = Cells(i, 3)
    strLinkText = Cells(i, 9)
    strNewText = "<a href=" & Chr(34) & strLink & Chr(34) & ">" & strLinkText & "</a>"
    .HTMLBody = Replace(.HTMLBody, strfind, strNewText, 1, 1, vbTextCompare)
    
    .Display

    .send
    End With
    Cells(i, 1) = "Mail sent successfully"
    Next i
    C:
    Application.ScreenUpdating = True

    tme2 = Now() - Tme1
    Application.StatusBar = Format(tme2, "h:mm:SS")
End Sub

您可以使用内联 CSS:

strNewText = "<a style='color:#F00;' href='" & strLink & "'>" & strLinkText & "</a>"