使用这个,开始使用“txt”而不是objitem.body进行填充。
If objItem.BodyFormat = olFormatHTML Then
txt = objItem.Body
strt = InStr(txt, "HYPERLINK")
do until strt = 0
nd = InStr(strt + 13, txt, """")
txt = Left(txt, strt - 1) & Mid(txt, nd + 1)
strt = InStr(txt, "HYPERLINK")
loop
End If
If objItem.BodyFormat = olFormatRichText Then
txt = objItem.Body
strt = InStr(txt, " HYPERLINK")
do until strt = 0
nd = InStr(strt + 13, txt, """")
txt = Left(txt, strt - 1) & Mid(txt, nd + 2)
strt = InStr(txt, " HYPERLINK")
loop
End If
然后用正文填充文本区域..
If objItem.BodyFormat = olFormatHTML Then ie.document.getElementById("message").Value = Replace(txt, vbCrLf & vbCrLf, vbCrLf) End If If objItem.BodyFormat = olFormatPlain Then ie.document.getElementById("message")。 Value = objItem.Body End If If objItem.BodyFormat = olFormatRichText Then ie.document.getElementById("message").Value = txt End If