• Outlook User
  • New Outlook app
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
  • Developer
  • Microsoft 365 Admin
    • Common Problems
    • Microsoft 365
    • Outlook BCM
    • Utilities & Addins

Always Reply Using HTML Format in Outlook

Slipstick Systems

› Developer › Always Reply Using HTML Format in Outlook

Last reviewed on May 5, 2017     59 Comments

Applies to: Outlook (classic), Outlook 2007

I'm often asked how to set Outlook to always reply in a specific format. While I don't recommend changing the reply format (because the sender choose the format for a reason), you can change it using a macro.

How do I set Outlook to always reply in HTML or RTF? When replying to, or forwarding, an email that is in plain text format, it always uses plain text. I want to force it to use RTF or HTML. I know I can change it every time, but I want it to be automatic.

The answer: Outlook does not offer a way to always use a specific format for all replies, be it RTF or HTML. You need to either change it on each message or write VBA macro to change the format. (You can force plain text replies to all messages by using the option to read all mail in plain text.)

We do not recommend always using HTML format (and certainly not RTF format) because you cannot be 100% sure that the sender is not using a smartphone or other device to read and reply to their mail. Many devices use plain text, either by default or as an option to the user and you should avoid changing the format on replies unless you have a valid reason - such as highlighting text, inserting tables or using bullet points. If you are replying with basic paragraphs of text, respect the sender's choice of plain text format.

Absolutely do not use RTF format for any message unless you know for a fact that the recipient will be reading it in Outlook (or OWA), otherwise they will get a plain text message and a winmail.dat attachment.

One of the readers of our Outlook Daily Tips mailing list posted the following macro. It was tested on Outlook 2007 and Outlook 2010 but should work on other versions.

Choose if you want to reply in HTML or plain text in this line:
'olFormat = olFormatPlain '(*1) - always use plain text
olFormat = olFormatHTML '(*2) - always use HTML

In the macro below, reply, forward, reply to all is generated using HTML.

If You want it to be in plain, comment out the HTML line and uncomment the plain text line, like this:
olFormat = olFormatPlain '(*1) - always use plain text
'olFormat = olFormatHTML '(*2) - always use HTML

And don't forget to disable macro warnings!

The Code

Copy and paste the code from this page into your ThisOutlookSession project.

In Outlook, press Alt+F11 to open the VBA editor and expand Microsoft Outlook Objects then double click on ThisOutlookSession to open it in the editing pane and Ctrl+P to paste the code.

Click the button to run the macroThis macro runs on application start up and monitors reply events. To test it without restarting, you can click within the Application_Startup macro and press the Run button in the Toolbar.

You'll also need to set macro security to allow the macro to run. While the low setting is OK for testing, we recommend using SelfCert to sign the macro if you are using it long-term.

Option Explicit 

Private WithEvents oExpl As Explorer 
Private WithEvents oItem As MailItem 

Private bDiscardEvents As Boolean 
Private olFormat As OlBodyFormat 

Private Sub Application_Startup() 
    
   Set oExpl = Application.ActiveExplorer 
    
   bDiscardEvents = False 
    
   'olFormat = olFormatPlain        '(*1) - reply using plain text  
   olFormat = olFormatHTML        '(*2) - reply using HTML 
    
End Sub 

Private Sub oExpl_SelectionChange() 

   On Error Resume Next 
   Set oItem = oExpl.Selection.Item(1) 
    
End Sub 

Private Sub oItem_Reply(ByVal Response As Object, Cancel As Boolean) 

   If bDiscardEvents Or oItem.BodyFormat = olFormat Then 
       Exit Sub 
   End If 
    
   Cancel = True 

   bDiscardEvents = True 
    
   Dim oResponse As MailItem 
   Set oResponse = oItem.Reply 
   oResponse.BodyFormat = olFormat 
   oResponse.Display 
    
   bDiscardEvents = False 
    
End Sub 

Private Sub oItem_ReplyAll(ByVal Response As Object, Cancel As Boolean) 

   If bDiscardEvents Or oItem.BodyFormat = olFormat Then 
       Exit Sub 
   End If 

   Cancel = True 
  
   bDiscardEvents = True 
    
   Dim oResponse As MailItem 
   Set oResponse = oItem.ReplyAll 
   oResponse.BodyFormat = olFormat 
   oResponse.Display 
    
   bDiscardEvents = False 
    
End Sub 

Private Sub oItem_Forward(ByVal Forward As Object, Cancel As Boolean) 
    
   If bDiscardEvents Or oItem.BodyFormat = olFormat Then 
       Exit Sub 
   End If 
    
   Cancel = True 

   bDiscardEvents = True 
    
   Dim oResponse As MailItem 
   Set oResponse = oItem.Forward 
   oResponse.BodyFormat = olFormat 
   oResponse.Display 
    
   bDiscardEvents = False 
    
End Sub

Always Reply using Plain Text, Change Header

This version of the oItem_Reply macro always replies using plain text and changes the header block at the top of the message from this:


 -----Original Message-----
 From: EMO [mailto:emo@slipstick.com]
 Sent: Friday, November 18, 2016 3:14 AM
 Subject: Exchange Messaging Outlook: Goodbye RPC over HTTP

To this:

 On Fri, Nov 18, 2016 at 03:14:18, EMO wrote:
 

This macro will always use plain text. If you want to maintain the format and only change the header, use the code sample from In-line reply style in Outlook.

Option Explicit
Private WithEvents oExpl As Explorer
Private WithEvents oItem As MailItem
Private bDiscardEvents As Boolean
Dim oResponse As MailItem
  
Private Sub Application_Startup()
   Set oExpl = Application.ActiveExplorer
   bDiscardEvents = False
End Sub
  
Private Sub oExpl_SelectionChange()
   On Error Resume Next
   Set oItem = oExpl.Selection.Item(1)
End Sub
  
' Reply
Private Sub oItem_Reply(ByVal Response As Object, Cancel As Boolean)
   Cancel = True
   bDiscardEvents = True
' these two lines change the format and add > to the plain text reply
oItem.BodyFormat = olFormatPlain
oItem.Actions("Reply").ReplyStyle = olReplyTickOriginalText

Set oResponse = oItem.Reply
 afterReply
End Sub

Private Sub oItem_Forward(ByVal Response As Object, Cancel As Boolean)
   Cancel = True
   bDiscardEvents = True
' these two lines change the format and add > to the plain text reply
oItem.BodyFormat = olFormatPlain
oItem.Actions("Forward").ReplyStyle = olReplyTickOriginalText

Set oResponse = oItem.Forward

 afterReply
End Sub

Private Sub oItem_ReplyAll(ByVal Response As Object, Cancel As Boolean)
   Cancel = True
   bDiscardEvents = True

' these two lines change the format and add > to the plain text reply
oItem.BodyFormat = olFormatPlain
oItem.Actions("Reply to All").ReplyStyle = olReplyTickOriginalText

Set oResponse = oItem.ReplyAll

 afterReply
End Sub

Private Sub afterReply()
 Dim datestr As String
Dim orgBody As String
Dim myBody As String
Dim newBody As String
Dim name As String
Dim pos
Dim b
Dim Lines
Dim myLine

   bDiscardEvents = True
   
' Delete the signature from the top of the message
    Dim objDoc  As Object 'Word.Document
    Dim oBookmark As Object 'Word.Bookmark

    On Error Resume Next
    Set objDoc = oItem.GetInspector.WordEditor
    Set oBookmark = objDoc.Bookmarks("_MailAutoSig")

    If Not oBookmark Is Nothing Then
        oBookmark.Select
        objDoc.Windows(1).Selection.Delete
    End If

'if you want to add a signature at the end
'Set objFSO = CreateObject("Scripting.FileSystemObject")
''Edit the signature file name on the following line as needed'
'Set objSignatureFile = objFSO.OpenTextFile("C:\path-to-signature.txt")
'sig = objSignatureFile.ReadAll
'objSignatureFile.Close
 
name = oItem.SentOnBehalfOfName
datestr = Format(oItem.SentOn, "DDD, MMM dd, yyyy at HH:mm:ss")
     
' - Remove Outlook-style reply header
orgBody = oResponse.Body
pos = InStr(orgBody, ">") - 1
myBody = Mid(orgBody, pos + 1)
b = 0
Lines = Split(myBody, vbNewLine)
For Each myLine In Lines
If b > 4 Then
newBody = newBody & myLine & vbNewLine
End If
b = b + 1
Next
   
' Put new body together
oResponse.Body = "On " & datestr & ", " & name & " wrote:" _
& vbNewLine & newBody & vbNewLine '& sig

   oResponse.Display
    
   bDiscardEvents = False
'close the message you are replying to without saving changes
' (it was converted to plain text)
oItem.Close olDiscard
     
End Sub

How to use the Macro

First: You will need macro security set to low during testing.

To check your macro security in Outlook 2010 or 2013, go to File, Options, Trust Center and open Trust Center Settings, and change the Macro Settings. In Outlook 2007 and older, it’s at Tools, Macro Security. If Outlook tells you it needs to be restarted, close and reopen Outlook. Note: after you test the macro and see that it works, you can either leave macro security set to low or sign the macro.

Now open the VBA Editor by pressing Alt+F11 on your keyboard.

To use the macro code in ThisOutlookSession:

  1. Expand Project1 and double click on ThisOutlookSession.
  2. Copy then paste the macro into ThisOutlookSession. (Click within the code, Select All using Ctrl+A, Ctrl+C to copy, Ctrl+V to paste.)

Application_Startup macros run when Outlook starts. If you are using an Application_Startup macro you can test the macro without restarting Outlook by clicking in the first line of the Application_Startup macro then clicking the Run button on the toolbar or pressing F8.

More information as well as screenshots are at How to use the VBA Editor.

Always Reply Using HTML Format in Outlook was last modified: May 5th, 2017 by Diane Poremsky

Related Posts:

  • Macro to Reply, ReplyAll, or Forward and File
  • VBA Sample: Do Something When Reply is Clicked
  • Copy attachment names when replying
  • Replying to Sent Messages

About Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Subscribe
Notify of
59 Comments
newest
oldest most voted
Inline Feedbacks
View all comments

Brian Kelly
February 7, 2023 5:20 pm

Many thanks for this--it was an excellent example that helped me to implement this. I would note that it does not support the Use Case where someone Declines a Meeting Request and you want to respond to their Decline note, because it does not handle MeetingItems, but that was relatively easy to fix once I figured that out--just need a similar oMeetingItem object as the oItem object in the example above. I also modularized it such that the real meat of the code is in one function that is called by the various event handlers.

One issue that I hit, however, is that when this is implemented, the content of the Reply is all considered "new text", which means that when I hit send and the spellchecker kicks in, it does not check solely my actual reply, but the entire thread, even though the "Ignore original message text in reply or forward" is checked.

I will look into determining if there is a way to prevent that, but if anyone has any ideas how I can avoid this, I would love to hear them.

0
0
Reply
Thomas Kahn
October 30, 2020 2:41 pm

Sadly this script did not work for me in Outlook 2019. But using AutoHotkey I got it to work. As soon as I open a plain text message AHK quickly switches to the Format menu, selects HTML and switches back, it's barely noticable. This script can be found in this thread on the Microsoft Forum:

https://social.technet.microsoft.com/Forums/ie/en-US/d55e55d5-f8d4-4358-85cc-cc17d5d92b51/outlook-2010-always-reply-using-html-format-option

Search for AutoHotkey.

0
0
Reply
Kalan
August 14, 2017 3:52 pm

I would really like to know what smartphone can't read HTML email... It's 2017 all Android and iOS phones can read HTML, also if your webmail can't read HTML email you need to have your provider change that ASAP.

1
0
Reply
Diane Poremsky
Author
Reply to  Kalan
August 14, 2017 4:02 pm

there are still a few that can't do HTML but it's not just about the device supporting it, it's also the "cost" of html in data. My sister does not have unlimited data and her only internet access is through the phone; converting her messages to html would add about 10 kb to each message. It's not just cellular providers who set data limits - not everyone has unlimited data.

1
-1
Reply
Rossy001
June 17, 2016 10:41 pm

Hello Diane. Thank you for this! I have successfully implemented your code, except not the "Change the Reply Font" code you provided, quoted here again. Where do I insert this code, please?

oResponse.HTMLBody = " " & oResponse.HTMLBody

0
0
Reply
Diane Poremsky
Reply to  Rossy001
June 19, 2016 10:00 pm

Add the line between these if there is a not a line that sets the HTMLBody already in the code.
oResponse.BodyFormat = olFormat
oResponse.Display

0
0
Reply
John Batts
June 23, 2015 3:21 pm

Thank you for this post. I hope that there is something that can be modified to allow me to bypass the problems that I have.
Specifically, there are instances where my Reply to a message assumes some formatting from the original message, causing the spacing between paragraphs to be abnormally big. Additionally, when I Reply to a message from someone in South Korea, the lines become justified and then break the words at irregular spots without hyphenation.
I can correct this by choosing Format Text-->Styles-->Change Styles-->Style Set-->Reset to Quick Styles from Template
I would love it if there was a way to automatically do this! It only impacts HTML-based messages - I don't recall seeing this issue if the original post was a pure text-based message. And I don't necessarily want to override from Text to HTML, out of respect for the recipient. But I don't want to have to do the process described above every time I type a message to one of those problematic recipients.
Thank you!
Thank you!

0
0
Reply
Christoph
January 19, 2013 5:58 am

Thanks for this script.
I'm using it but when I reply to an email, the font changes to Times New Roman.
I need Verdana, 10pt, grey. How can I change that?
In the settings of Outlook 2010 are the right font settings.

0
0
Reply
Diane Poremsky
Reply to  Christoph
January 21, 2013 11:34 am

This happens because Outlook uses word as the editor - you can change the font fairly easily, but changing the font size is a little more complicated and i don't have a sample that does that. You'll add the oResponse.HTMLBody line as shown in this snippet - and can remove the bodyformat line.

Dim oResponse As MailItem
Set oResponse = oItem.Reply
oResponse.HTMLBody = " " & " " & oResponse.HTMLBody

oResponse.Display
bDiscardEvents = False

0
0
Reply
zsolt
Reply to  Diane Poremsky
March 27, 2014 4:07 am

This code does not work, there is a synthax error in the font definition line and also in. bDiscardEvents = False

0
0
Reply
D Poremsky
Reply to  zsolt
March 27, 2014 6:21 am

it looks like the conversion from WordPress to Disqus messed the code up. Every "&" should be "&" - it was converted to the html code for &. (The = multiplied too.)

0
0
Reply
D Poremsky
Reply to  zsolt
March 27, 2014 7:17 am

The correct code (assuming it doesn't get messed up again) is

[code]oResponse.HTMLBody = "<font face=" & Chr(34) & " verdana" & Chr(34) & "> <font color=" & Chr(34) & " green" & Chr(34) & "> " & oResponse.HTMLBody[/code]

The 2 closing font tags were added by the web software too. Outlook will rewrite the color tags to CSS and properly close the tags when you hit Send.
I updated the article to include this line of code.

0
0
Reply
josh wilson
September 28, 2012 12:43 pm

i love the the above code, any way to insert me signal to it

0
0
Reply
Andy Wright
April 13, 2012 2:46 am

Thanks for this, with the altering of Macro security this now works just fine.
I had the problem mentioned by other poster whereby the signiature is inserted in plain text not HTML.
My way round the problem is to set outlook to not automatically add a sig to replies.
I then click reply and then click insert signiature
The sig has a few lines of text in my preferred font above the sig image, so I can then just click in that section and start typing in the desired font.
Yes this is a bit of a faff, but it leaves me with $30 to spend on beer instead :)

0
0
Reply
Diane Poremsky
Reply to  Andy Wright
April 17, 2012 4:37 am

Beer is better than outlook. :) Depending on your version of Outlook, you can customize the toolbar, ribbon, or QAT to make the Insert signature command a step away, reducing your effort further.

0
0
Reply

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 30 Issue 34

Subscribe to Exchange Messaging Outlook






Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • Week Month All
  • Use Classic Outlook, not New Outlook
  • Mail Templates in Outlook for Windows (and Web)
  • How to Remove the Primary Account from Outlook
  • Reset the New Outlook Profile
  • Disable "Always ask before opening" Dialog
  • Adjusting Outlook's Zoom Setting in Email
  • This operation has been cancelled due to restrictions
  • How to Hide or Delete Outlook's Default Folders
  • Change Outlook's Programmatic Access Options
  • Outlook Folders Appear Empty after Exporting an IMAP Account
  • Opt out of Microsoft 365 Companion Apps
  • Mail Templates in Outlook for Windows (and Web)
  • Urban legend: Microsoft Deletes Old Outlook.com Messages
  • Buttons in the New Message Notifications
  • Move Deleted Items to Another Folder Automatically
  • Open Outlook Templates using PowerShell
  • Count and List Folders in Classic Outlook
  • Google Workspace and Outlook with POP Mail
  • Import EML Files into New Outlook
  • Opening PST files in New Outlook
Ajax spinner

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in classic Outlook (Windows).

For new Outlook for Windows: Fixes or workarounds for recent issues in new Outlook for Windows .

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Outlook.com Recent issues: Fixes or workarounds for recent issues on Outlook.com

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Outlook (new) Feedback. Use this for feedback and suggestions for Outlook (new).

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




New Outlook Articles

Opt out of Microsoft 365 Companion Apps

Mail Templates in Outlook for Windows (and Web)

Urban legend: Microsoft Deletes Old Outlook.com Messages

Buttons in the New Message Notifications

Move Deleted Items to Another Folder Automatically

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Google Workspace and Outlook with POP Mail

Import EML Files into New Outlook

Opening PST files in New Outlook

Newest Code Samples

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Insert Word Document into Email using VBA

Warn Before Deleting a Contact

Use PowerShell to Delete Attachments

Remove RE:, FWD:, and Other Prefixes from Subject Line

Change the Mailing Address Using PowerShell

Categorize @Mentioned Messages

Send an Email When You Open Outlook

Delete Old Calendar Events using VBA

VBA Basics

How to use the VBA Editor

Work with open item or selected item

Working with All Items in a Folder or Selected Items

VBA and non-default Outlook Folders

Backup and save your Outlook VBA macros

Get text using Left, Right, Mid, Len, InStr

Using Arrays in Outlook macros

Use RegEx to extract message text

Paste clipboard contents

Windows Folder Picker

Custom Forms

Designing Microsoft Outlook Forms

Set a custom form as default

Developer Resources

Developer Resources

Developer Tools

VBOffice.net samples

SlovakTech.com

Outlook MVP David Lee

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Diane Poremsky [Outlook MVP]

Make a donation

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Submit Outlook Feature Requests

Slipstick Support Services

Buy Microsoft 365 Office Software and Services

Visit Slipstick Forums.

What's New at Slipstick.com

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2025 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.

:wpds_smile::wpds_grin::wpds_wink::wpds_mrgreen::wpds_neutral::wpds_twisted::wpds_arrow::wpds_shock::wpds_unamused::wpds_cool::wpds_evil::wpds_oops::wpds_razz::wpds_roll::wpds_cry::wpds_eek::wpds_lol::wpds_mad::wpds_sad::wpds_exclamation::wpds_question::wpds_idea::wpds_hmm::wpds_beg::wpds_whew::wpds_chuckle::wpds_silly::wpds_envy::wpds_shutmouth:
wpDiscuz

Sign up for Exchange Messaging Outlook

Our weekly Outlook & Exchange newsletter (bi-weekly during the summer)






Please note: If you subscribed to Exchange Messaging Outlook before August 2019, please re-subscribe.

Never see this message again.

You are going to send email to

Move Comment