Bỏ qua nội dung chính

Làm cách nào để trả lời tự động ở định dạng HTML trong Outlook?

Trong Microsoft Outlook, chúng tôi có thể cấu hình cài đặt và soạn tất cả thư mới ở định dạng HTML, nhưng không thể tự động trả lời thư ở định dạng HTMT, vì nó luôn trả lời ở định dạng ban đầu của thư đã nhận. Bài viết này sẽ giới thiệu cho bạn các thủ thuật về trả lời tự động ở định dạng HTML trong Outlook.

Trả lời ở định dạng HTML theo cách thủ công với định dạng
Trả lời ở định dạng HTML tự động với VBA
Luôn tự động trả lời ở định dạng HTML với Kutools cho Outlook


Trả lời ở định dạng HTML theo cách thủ công với định dạng

Dễ dàng chuyển đổi định dạng Văn bản thuần túy hoặc Văn bản đa dạng thức sang định dạng HTML khi bạn đang trả lời email trong Outlook.

1: Chọn email mà bạn sẽ trả lời sau.

2: Nhấp vào đáp lại nút trên Trang Chủ (hoặc trên Thanh công cụ trong Outlook 2007) để trả lời thư email đã chọn.

3: Nhấp vào HTML trên Định dạng văn bản tab (hoặc Các lựa chọn trong Outlook 2007).

Sau đó, tin nhắn trả lời được chuyển đổi sang định dạng HTML ngay lập tức.

4: Soạn thư trả lời này và nhấp vào Gửi .


Trả lời ở định dạng HTML tự động với VBA

Phương pháp sau đây sẽ giúp bạn tự động trả lời tất cả các thư email ở định dạng HTML trong Microsoft Outlook.

1: Chọn email mà bạn sẽ trả lời ở định dạng HTML.

2: Nhấn Khác + F11 để mở cửa sổ Microsoft Visual Basic for Applications.

3: Nhấp vào Chèn > Mô-đun.

4: Dán mã sau vào cửa sổ mô-đun mới.

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: Nếu bạn chỉ muốn trả lời thư đã chọn này ở định dạng html, vui lòng nhấn F5 phím để chạy mã. Sau đó, cửa sổ tin nhắn trả lời bật lên, vui lòng soạn nó và nhấn Gửi để gửi email.

Lời khuyên::
Nếu bạn muốn luôn hoặc thường xuyên trả lời email ở định dạng html trong tương lai trong Outlook, hãy tiếp tục cấu hình như sau.
1) Nhấp vào Tùy chỉnh thanh công cụ truy cập nhanh trong dải băng Outlook và sau đó nhấp vào Các lệnh khác từ thả xuống

2) Trong Tùy chọn Outlook hộp thoại, bạn cần:
2.1) Chọn Macros trong Chọn lệnh từ danh sách thả xuống;
2.2) Chọn Project1.AlwaysReplyInHTML trong hộp lệnh;
2.3) Nhấp vào Thêm nút (bạn có thể thấy macro đã chọn được thêm vào hộp bên phải);
2.4) Nhấp vào OK cái nút. Xem ảnh chụp màn hình:

3) Bây giờ macro được thêm vào Thanh công cụ Truy nhập Nhanh và được hiển thị dưới dạng  biểu tượng. Mỗi khi bạn cần trả lời email ở định dạng html, hãy chọn email và nhấn vào nút này để kích hoạt nó.


Luôn tự động trả lời ở định dạng HTML với Kutools cho Outlook

Kutools cho Outlook : với hơn 100 phần bổ trợ Outlook tiện dụng, dùng thử miễn phí không giới hạn trong 60 ngày.

Ở đây tôi giới thiệu cho bạn một tiện ích hữu ích - Định dạng trả lời đã sửa of Kutools cho Outlook. Với tiện ích này, bạn có thể dễ dàng chỉ định định dạng trả lời như HTML, văn bản thuần túy và RTF, đồng thời sửa định dạng được chỉ định làm định dạng trả lời cho tất cả các email trả lời trong tương lai.

1. nhấp chuột Kutools > Định dạng cố định > Định dạng trả lời đã sửa > Đặt định dạng trả lời. Xem ảnh chụp màn hình:

2. bên trong Đặt định dạng trả lời hộp thoại, chọn HTML tùy chọn và sau đó nhấp vào OK .

3. Bây giờ hãy nhấp vào Định dạng cố định > Định dạng trả lời đã sửaBật định dạng trả lời cố định trong tab Kutools để bật tiện ích.

Kể từ bây giờ, Outlook luôn trả lời email ở định dạng HTML.

Nếu bạn muốn dùng thử miễn phí tiện ích này, vui lòng truy cập tải xuống miễn phí phần mềm đầu tiên, và sau đó đi đến áp dụng hoạt động theo các bước trên.


Công cụ năng suất văn phòng tốt nhất

Kutools cho Outlook - Hơn 100 tính năng mạnh mẽ để tăng cường Outlook của bạn

🤖 Trợ lý thư AI: Email chuyên nghiệp tức thì với phép thuật AI--một cú nhấp chuột để có câu trả lời xuất sắc, giọng điệu hoàn hảo, khả năng thông thạo đa ngôn ngữ. Chuyển đổi email một cách dễ dàng! ...

📧 Tự động hoá email: Vắng Mặt (Có sẵn cho POP và IMAP)  /  Lên lịch gửi email  /  Tự động CC/BCC theo quy định khi gửi Email  /  Tự động chuyển tiếp (Quy tắc nâng cao)   /  Tự động thêm lời chào   /  Tự động chia email nhiều người nhận thành các tin nhắn riêng lẻ hữu ích. Cảm ơn !

📨 Quản lý email: Dễ dàng thu hồi email  /  Chặn email lừa đảo theo chủ đề và những người khác  /  Xóa các email trùng lặp  /  Tìm Kiếm Nâng Cao  /  Hợp nhất các thư mục hữu ích. Cảm ơn !

📁 Tệp đính kèm chuyên nghiệpLưu hàng loạt  /  Tách hàng loạt  /  Nén hàng loạt  /  Tự động lưu   /  Tự động tách  /  Tự động nén hữu ích. Cảm ơn !

🌟 Giao diện ma thuật: 😊Thêm nhiều biểu tượng cảm xúc đẹp và thú vị hơn   /  Tăng năng suất Outlook của bạn với chế độ xem theo thẻ  /  Thu nhỏ Outlook thay vì đóng hữu ích. Cảm ơn !

👍 Kỳ quan chỉ bằng một cú nhấp chuột: Trả lời tất cả bằng tệp đính kèm đến  /   Email chống lừa đảo  /  🕘Hiển thị múi giờ của người gửi hữu ích. Cảm ơn !

👩🏼‍🤝‍👩🏻 Danh bạ & Lịch: Thêm hàng loạt liên hệ từ các email đã chọn  /  Chia nhóm liên hệ thành các nhóm riêng lẻ  /  Xóa lời nhắc sinh nhật hữu ích. Cảm ơn !

Trên 100 tính năng Chờ đợi sự khám phá của bạn! Bấm vào đây để khám phá thêm.

 

 

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!
This comment was minimized by the moderator on the site
Thanks a lot for this macro!
This comment was minimized by the moderator on the site
this only changes the email i have selected. how do you change it for all emails?
This comment was minimized by the moderator on the site
Same thing for me. Did you get any help?
This comment was minimized by the moderator on the site
Please, do you know the appropriate 'Alt F11' and 'F5' keys when using Outlook 2016 on a Mac?
This sure is an annoying omission by Microsoft. Many thanks. Hope you can help.
This comment was minimized by the moderator on the site
Thanks, it worked. You are da man!
This comment was minimized by the moderator on the site
Thank you for this, but i am having issues. I copy/pasted and the number were put above the text when i pasted it and I got the error message - "compile error: invalid outside procedure" Then i tried to just erase the numbers and leave the test and got : Run time Error - could not send message. - I then clicked Debug and got the same error as others: Set oMsgReply = oMsg.Reply Thoughts?
This comment was minimized by the moderator on the site
Dont open the email, only highlight it in outlook. Alt +F11 insert the module F5 New email should open as HTML to reply
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations