Skip to main content

如何在Outlook中自動以HTML格式回覆?

Author: Kelly Last Modified: 2025-05-13

在 Microsoft Outlook 中,我們可以配置設定並將所有新郵件撰寫為 HTML 格式,但無法自動以 HTMT 格式回覆郵件,因為它總是會以接收到的郵件的初始格式進行回覆。本文將介紹一些技巧,讓您可以在 Outlook 中自動以 HTML 格式回覆郵件。

手動使用格式化以 HTML 格式回覆

始終使用 Kutools for Outlook 自動以 HTML 格式回覆

使用 VBA 自動以 HTML 格式回覆


手動使用格式化以 HTML 格式回覆

在 Outlook 中回覆電子郵件時,將純文本或豐富文本格式轉換為 HTML 格式非常容易。

1:選擇稍後要回覆的電子郵件。

2:點擊「Home」標籤上的「Reply」按鈕(或在 Outlook 2007 中的工具欄上)來回覆所選的電子郵件。

3:點擊「Format Text」標籤(或在 Outlook 2007 中的「Options」標籤)上的「HTML」。

reply in html format manually

然後,回覆的郵件會立即轉換為 HTML 格式。

4:編輯此回覆郵件,並點擊「Send」按鈕。


始終使用 Kutools for Outlook 自動以 HTML 格式回覆

在此我向您推薦一個方便的工具——Kutools for OutlookFixed Reply Formatting。使用這個工具,您可以輕鬆指定回覆格式,例如 HTML、純文本和 RTF,並將指定的格式固定為所有未來回覆郵件的回覆格式。

使用 Kutools for Outlook 解鎖極致郵件效率!永久免費獲取 70 項強大功能。立即下載免費版本

1. 點擊 Kutools Plus > Utilities > Fixed Reply Formatting > Set Reply Formatting

2. 在「Set Reply Formatting」對話框中,選擇 HTML 選項,然後點擊「OK」按鈕。

always reply in html format by kutools for outlook 1

3. 現在請點擊 Kutools Plus 標籤下的 Fixed Formatting > Fixed Reply Formatting > Enable Fixed Reply Formatting 啟用該工具。

從現在開始,Outlook 將始終以 HTML 格式回覆電子郵件。

如果您想免費試用這個工具,請前往 免費下載該軟體,然後按照上述步驟進行操作。


使用 VBA 自動以 HTML 格式回覆

以下方法將幫助您在 Microsoft Outlook 中自動以 HTML 格式回覆所有電子郵件。

1:選擇將以 HTML 格式回覆的電子郵件。

2:按下 Alt + F11 鍵打開 Microsoft Visual Basic for Applications 窗口。

3:點擊 Insert > Module

4:將以下代碼粘貼到新的模塊窗口中。

Sub AlwaysReplyInHTML()
Dim oSelection As Outlook.Selection
Dim oItem As Object
'Get the selected item
Select Case TypeName(Application.ActiveWindow)
Case "Explorer"
Set oSelection = Application.ActiveExplorer.Selection
If oSelection.Count > 0 Then
Set oItem = oSelection.Item(1)
Else
MsgBox "Please select an item first!", vbCritical, "Reply in HTML"
Exit Sub
End If
Case "Inspector"
Set oItem = Application.ActiveInspector.CurrentItem
Case Else
MsgBox "Unsupported Window type." & vbNewLine & "Please select or open an item first.", _
vbCritical, "Reply in HTML"
Exit Sub
End Select
    Dim oMsg As Outlook.MailItem
Dim oMsgReply As Outlook.MailItem
Dim bPlainText As Boolean
'Change the message format and reply
If oItem.Class = olMail Then
Set oMsg = oItem
If oMsg.BodyFormat = olFormatPlain Then
bPlainText = True
End If
oMsg.BodyFormat = olFormatHTML
Set oMsgReply = oMsg.Reply
If bIsPlainText = True Then
oMsg.BodyFormat = olFormatPlain
End If
oMsg.Close (olSave)
oMsgReply.Display
'Selected item isn't a mail item
Else
MsgBox "No message item selected. Please select a message first.", _
vbCritical, "Reply in HTML"
Exit Sub
End If
'Cleanup
Set oMsgReply = Nothing
Set oMsg = Nothing
Set oItem = Nothing
Set oSelection = Nothing
End Sub

5:如果您只想以 html 格式回覆這封選定的郵件,請按 F5 鍵運行代碼。然後回覆郵件窗口彈出,請編輯它並按 Send 按鈕發送郵件。

注意:
如果您希望以後在 Outlook 中始終或經常以 html 格式回覆郵件,請繼續如下配置。
1) 點擊 Outlook 功能區中的 Customize Quick Access Toolbar 按鈕,然後從下拉菜單中點擊 More Commands
reply in html format by vba 1
2) 在 Outlook Options 對話框中,您需要:
2.1) 在 Choose commands from 下拉列表中選擇 Macros
2.2) 在命令框中選擇 Project1.AlwaysReplyInHTML
2.3) 點擊 Add 按鈕(您可以看到選定的宏已添加到右側的框中);
2.4) 點擊 OK 按鈕。見截圖:
reply in html format by vba 2
3) 現在該宏已添加到快速訪問工具欄上,並顯示為圖標。每次當您需要以 html 格式回覆郵件時,請選擇郵件並點擊此按鈕啟動它。
reply in html format by vba 3