2015-12-10 340 views
1

我正在努力突出顯示電子郵件中的部分文本。消息分配在一個變量中,後來通過.HTMLbody = message_variable添加。vba在Outlook電子郵件中突出顯示文本使用HTML標記的電子郵件

以下是代碼,我需要用黃色突出顯示「請在5個工作日內恢復」。沒有HTML背景標籤爲我工作。使用

msg_var = "<font face=Arial> <p style=font-size:10pt>" & _ 
       "Dear Sir/ Madam, <br />" & _ 
       "<br />" & _ 
       "MANY LINES OF TEXT" & _ 
       "<font color=red>" & _ 
       "Please revert within 5 working days" & _ 
       "</font>" & _ 
       "Best Regards, <br />" & _ 
       "</font>" 

展望爲2013

回答

1

我用"<span style='background:yellow;mso-highlight:yellow'>"高亮文本</span>

msg_var = "<font face=Arial> <p style=font-size:10pt>" & _ 
      "Dear Sir/ Madam, <br />" & _ 
      "<br />" & _ 
      "MANY LINES OF TEXT" & _ 
      "<font color=red>" & "<span style='background:yellow;mso-highlight:yellow'>" & _ 
      "Please revert within 5 working days" & _ 
      "</font>" & "</span>" & _ 
      "Best Regards, <br />" & _ 
      "</font>" 
相關問題