跳到主要内容

如何在Outlook中自动以HTML格式回复?

作者:凯莉 最后修改时间:2020-05-19

在Microsoft Outlook中,我们可以配置设置并以HTML格式编写所有新邮件,但是不能自动以HTMT格式答复邮件,因为它始终以收到的邮件的初始格式答复。 本文将向您介绍有关在Outlook中自动以HTML格式答复的技巧。

以格式手动回复HTML格式
使用VBA自动以HTML格式回复
始终使用 Kutools for Outlook 自动回复 HTML 格式


以格式手动回复HTML格式

在Outlook中回复电子邮件时,很容易将纯文本或RTF格式转换为HTML格式。

1:选择您稍后将回复的电子邮件。

2:点击 回复 上的按钮 主页 标签(或Outlook 2007中的工具栏上)以回复选定的电子邮件。

3:点击 HTML格式化文字 标签(或 附加选项 标签在Outlook 2007中)。

然后,回复消息立即转换为HTML格式。

4:撰写此回复消息,然后单击 提交 按钮。


使用VBA自动以HTML格式回复

以下方法将帮助您在Microsoft Outlook中自动答复HTML格式的所有电子邮件。

1:选择您将以HTML格式回复的电子邮件。

2:按 其他 + F11 键以打开“ Microsoft Visual Basic应用程序”窗口。

3:点击 插页 > 模块.

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 键来运行代码。 然后弹出回复消息窗口,请进行撰写,然后按 提交 按钮发送电子邮件。

提示::
如果您以后希望在Outlook中始终或频繁地以html格式答复电子邮件,请继续进行以下配置。
1)点击 自定义快速访问工具栏 单击Outlook功能区中的按钮,然后单击 更多命令 从下拉。

2)在 Outlook选项 对话框,您需要:
2.1)选择 ,在 从中选择命令 下拉列表;
2.2)选择 项目1.AlwaysReplyInHTML 在命令框中
2.3)点击 添加 按钮(您可以看到所选宏已添加到右侧框中);
2.4)点击 OK 按钮。 看截图:

3)现在,宏已添加到快速访问工具栏上,并显示为  图标。 每当您需要以html格式回复电子邮件时,请选择电子邮件,然后单击此按钮将其激活。


始终使用 Kutools for Outlook 自动回复 HTML 格式

Kutools for Outlook :具有100多个方便的Outlook加载项, 30天免费试用.

在这里,我向您推荐一个方便的实用程序– 固定回复格式 of Kutools for Outlook。 使用此实用程序,您可以轻松指定答复格式,例如HTML,纯文本和RTF,并将指定的格式固定为以后所有答复电子邮件的答复格式。

1。 点击 库工具 > 固定格式 > 固定回复格式 > 设置回复格式。 看截图:

2.在 设置回复格式 对话框中,选择 HTML 选项,然后单击 OK 按钮。

3.现在请点击 固定格式 > 固定回复格式启用固定答复格式 在Kutools选项卡下以启用该实用程序。

从现在开始,Outlook始终以HTML格式答复电子邮件。

如果您想免费试用该实用程序,请转到 免费下载软件 首先,然后按照上述步骤进行操作。


最佳办公生产力工具

最新消息:Kutools for Outlook 发布 免费版本!

体验全新的 Kutools for Outlook 免费版本拥有 70 多项令人难以置信的功能,您可以永久使用! 点击立即下载!

🤖 Kutools人工智能 : 具有人工智能魔力的即时专业电子邮件——一键天才回复、完美语气、多语言掌握。轻松改变电子邮件! ...

📧 电子邮件自动化: 自动回复(适用于 POP 和 IMAP)  /  安排发送电子邮件  /  发送电子邮件时按规则自动抄送/密件抄送  /  自动转发(高级规则)   /  自动添加问候语   /  自动将多收件人电子邮件拆分为单独的消息 ...

📨 电子邮件管理: 撤回电子邮件  /  按主题和其他人阻止诈骗电子邮件  /  删除重复的电子邮件  /  高级搜索  /  合并文件夹 ...

📁 附件专业版批量保存  /  批量分离  /  批量压缩  /  自动保存   /  自动分离  /  自动压缩 ...

🌟 界面魔法: 😊更多又漂亮又酷的表情符号   /  收到重要邮件时提醒您  /  最小化 Outlook 而不是关闭 ...

👍 一键奇迹: 使用传入附件回复全部  /   反网络钓鱼电子邮件  /  🕘显示发件人的时区 ...

👩🏼‍🤝‍👩🏻 通讯录和日历: 从选定的电子邮件中批量添加联系人  /  将联系人组拆分为各个组  /  删除生日提醒 ...

只需单击一下即可立即解锁 Kutools for Outlook -永久免费. 别等了, 立即下载并提高您的效率!

kutools for outlook 功能1 kutools for outlook 功能2
 

 

 

Comments (25)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I've been using this macro for a couple years now. Unfortunately it has started to change the character set of the replied email to some unknown character set eg"整瑸栯浴㭬挠慨獲瑥甽晴㠭㸢਍䴼呅⁁䅎䕍∽敇" that is not translatable. Has anyone else come across this issue and if so were you able to find a fix?
This comment was minimized by the moderator on the site
Hi there,

Please try the code below:
Sub AlwaysReplyInHTML()
Dim xSelection As Outlook.Selection
Dim xItem As Object
Dim xMail As Outlook.MailItem
Dim xMailReply As Outlook.MailItem
'On Error Resume Next
Select Case TypeName(Application.ActiveWindow)
  Case "Explorer"
    Set xSelection = Application.ActiveExplorer.Selection
    If xSelection.Count > 0 Then
      Set xItem = xSelection.Item(1)
    Else
      MsgBox "Please select an item first!", vbCritical, "Kutools for Outlook"
      Exit Sub
    End If
  Case "Inspector"
    Set xItem = Application.ActiveInspector.CurrentItem
  Case Else
    MsgBox "Unsupported Window type." & vbNewLine & "Please select or open an item first.", vbCritical, "Kutools for Outlook"
    Exit Sub
End Select
If xItem.Class = olMail Then
  Set xMail = xItem
  Set xMailReply = xMail.Reply
  xMailReply.Display
  xMailReply.BodyFormat = olFormatHTML
Else
  MsgBox "No message item selected. Please select a message first.", vbCritical, "Kutools for Outlook"
  Exit Sub
End If
Set xMailReply = Nothing
Set xMail = Nothing
Set xItem = Nothing
Set xSelection = Nothing
End Sub
This comment was minimized by the moderator on the site
Merci beaucoup.
Je l’ai modifié un peu, et ça fonctionne de nouveau chez moi, sans la transformation en Chinois…

Sub AlwaysReplyInHTML_Kutools()
Dim xSelection As Outlook.Selection
Dim xItem As Object
Dim xMail As Outlook.MailItem
Dim xMailReply As Outlook.MailItem

'On Error Resume Next
Select Case TypeName(Application.ActiveWindow)
  Case "Explorer"
    Set xSelection = Application.ActiveExplorer.Selection
    If xSelection.Count > 0 Then
      Set xItem = xSelection.Item(1)
    Else
      MsgBox "Please select an item first!", vbCritical, "Kutools for Outlook"
      Exit Sub
    End If
  Case "Inspector"
    Set xItem = Application.ActiveInspector.CurrentItem
  Case Else
    MsgBox "Unsupported Window type." & vbNewLine & "Please select or open an item first.", vbCritical, "Kutools for Outlook"
    Exit Sub
End Select

If xItem.Class = olMail Then
  Set xMail = xItem
  'Changer le format ici, afin que la réponse inclu notre signature en html…!
        xMail.BodyFormat = olFormatHTML
  
  Set xMailReply = xMail.Reply
  xMailReply.Display
  'xMailReply.BodyFormat = olFormatHTML
Else
  MsgBox "No message item selected. Please select a message first.", vbCritical, "Kutools for Outlook"
  Exit Sub
End If

Set xMailReply = Nothing
Set xMail = Nothing
Set xItem = Nothing
Set xSelection = Nothing
End Sub
This comment was minimized by the moderator on the site
Thanks I'll give that a go. Have a nice day.
This comment was minimized by the moderator on the site
Hi,

as for answering everyone - it's very simple - just change the 31st line of code:

Set oMsgReply = oMsg.Reply --> change "oMsg.ReplyAll" or change "oMsg.Forward"

And to apply for "all emails" just do this:
Instead of creating buttons in quick access, create new buttons directly in the ribbon (Customize Ribbon), create a "Custom" ("New Group") there and create buttons from macros (first macro to "reply to all", second macro to "forward").

And the original "Reply" group can be removed from the ribbon ;)

Anyway, extendoffice.com is a great site from which I sometimes draw data - many thanks... ;)
This comment was minimized by the moderator on the site
This is great and solves a long term frustration with outlook! As someone not experienced with VBA coding could I get a little more advice on how to set up the replyall and forward functionality. I have the 'replyinHTML' working (with a custom ribbon button for it) but am not sure how the get the other options working. Should I be creating a new project or new module within the existing project with the modified code at line 31?
Any help appreciated - thanks!
This comment was minimized by the moderator on the site
Hi, you should save them respectively as three different modules. :)
This comment was minimized by the moderator on the site
Thank you!
This comment was minimized by the moderator on the site
Hello,

This works very well, thanks. But... it does not reply to all. Only the sender of the email received is added to the reply. What should I change in the code so it does "Reply to all" instead of "Reply"?


Thanks!
This comment was minimized by the moderator on the site
Running the macro works for one instance, but how to replicate it to occur on every instance?
This comment was minimized by the moderator on the site
I followed all of the steps listed about but when I press F5 to run the Module I get an error message saying that the Macros for this project have been disabled. I even tried going into Outlooks settings and telling Outlook to enable all Macros. Any help would be greatly appreciated!
There are no comments posted here yet
Load More
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations