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"?
In Microsoft Outlook, we can configure settings and compose all new messages in HTML format, but can’t reply messages in HTMT format automatically, because it always reply in the initial format of received messages. This article will introduce you tricks about replying in HTML format automatically in Outlook.
It is easy to convert the formats of Plain Text or Rich text to the HTML format when you are replying an email message in Outlook.
1: Select the email message that you will reply later.
2: Click the Reply button on the Home tab (or on the Toolbar in Outlook 2007) to reply the selected email message.
3: Click the HTML on the Format Text tab (or Options tab in Outlook 2007).
Then the replying message is converted to the HTML format immediately.
4: Compose this replying message, and click the Send button.
The following method will help you reply all email messages in the HTML format automatically in Microsoft Outlook.
1: Select the email message that you will reply in the HTML format.
2: Press the Alt + F11 keys to open the Microsoft Visual Basic for Applications window.
3: Click the Insert > Module.
4: Paste the following code into the new module window.
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: If you want to only reply this selected message in html format, please press the F5 key to run the code. Then the replying message window pops up, please compose it and press the Send button to send the email.
Here I recommend you a handy utility – Fixed Reply Formatting of Kutools for Outlook. With this utility, you can easily specify a reply formatting such as HTML, plain text and RTF, and fix the specified formatting as the reply format for all future reply emails.
1. Click Kutools > Fixed Formatting > Fixed Reply Formatting > Set Reply Formatting. See screenshot:
2. In the Set Reply Formatting dialog box, select the HTML option and then click the OK button.
3. Now please click Fixed Formatting > Fixed Reply Formatting > Enable Fixed Reply Formatting under the Kutools tab to enable the utility.
From now on, Outlook always reply an email in HTML format.
If you want to have a free trial of this utility, please go to free download the software first, and then go to apply the operation according above steps.