Last reviewed on December 30, 2013   —  26 Comments

Applies to Microsoft Outlook 2010, Outlook 2007, Outlook 2003 and older

Outlook Tip’s Tip 434: Change Reply Format answered a frequent question:

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

Comments

  1. Lucian says

    Did not work for me too. Until I Looked at the code to debug and realized the program needs to be restarted.

    Restart Outlook to take affect.

    The only Problem I have know is changing the font as I don't like the one it is using but at least its better then Plain Text

  2. Diane Poremsky says

    Lucian:

    According to a user on my original blog where this was first posted: “I had my own fonts but they kept changing to the default “Times New Roman”. A small change to the code fixed that for me."

    Just flip the order of the following code:

    oResponse.BodyFormat = olFormat

    oResponse.Display

    to

    oResponse.Display

    oResponse.BodyFormat = olFormat

    For an alternate method using Autohotkey, see the comment by GPNolan, http://www.outlook-tips.net/outlook-email/change-...

  3. Diane Poremsky says

    James, what is your macro security setting? While we don't recommend using the low/run all macros setting all the time, you can set it to low to test the macro. If it works, we know its security, not the code.

    To test, set macro security to low then open the VBA editor, click within the application start up macro and click the Run button to kick start it.

  4. Chris says

    okay so this works - it will reply permanently in html = great. A reply to an email originally in text will now be replied to in html ..

    BUT .. what about adding of a working html signature after the email reply has been set to html? .. how can this be done in your macro above?

    • Diane Poremsky says

      The signature is added before the conversion - the only way around it is to not add an automatic signature.

  5. Adam Smith says

    Here is my VBA code to do this: https://gist.github.com/3458680

    This code is superior to the other VBA code because the VBA code to change to HTML format used by the other code messes up the formatting of the draft, and this code doesn’t need to hook every item that you view in Outlook.

  6. ej says

    I've been looking for this solution for a long time.. It's a real pain in the a**.

    1. I'm not techy and I don't know what to do with the code once i paste it.. anyone?
    2. Is there also a code to make it HTML when forwarding ?
    Thanks !

    • Diane Poremsky says

      The code includes macros for reply, reply all and forward.

      Paste it into ThisOutlookSession then click in the application_StartUp macro and press the run button.
      Oh, and you need to set macro security to low. In Outlook 2010/2013, go to File, Options, Trust center, macro security to change the setting.

    • Diane Poremsky says

      You need to click in Application_startup and click Run then when you hit Reply or Reply all button, the macro will run.

  7. Josiah Kuenzi says

    Hi Diane,
    Some executive users I support showed me an issue in replying to messages that were delivered to them in plain text format. The end goal is for the recipients to easily see their response notes. After hitting reply, they immediately change the format from Plain Text to HTML so that their comments will be inserted prefaced by [Name in Brackets] and in another color automatically as they have it set to do in the Outlook Mail Options.

    The problem is this setting (Signatures and Stationery | Replying or forwarding messages | font color | mark my comments with: JMK) only works with messages originally sent in HTML. Even when switching immediately to HTML upon clicking reply, the color is NOT applied although [Name in Brackets] does get inserted and the bold and italics formatting is applied.
    We have tested this in Outlook 2007, 2010, and 2013 and it seems to be broken in all versions as the automatic coloring is not applied. They want it to be efficient, quick, and automatic so they don't have to spend time manually highlighting and formatting the color of all their responses.
    Thank you for your help!

    • Diane Poremsky says

      I swear I answered this already, unless I started to and the browser crashed before I posted it. :) You can use a run a script macro to change the format of the messages as they arrive or use one that changes it before the message is opened for reply - but if you do this, the 'mark my replay' name is not inserted - but the font color is changed and the signature added.

      Code sample is here - selectively-change-message-format-replying that changes it before the reply, or use a run a script rule.

      The non-code way is to change the format using Edit Message, then change the format and hit reply.

  8. Ben says

    I also can't get this to work on Outlook 2013, even after restart. I've checked that macros are set to run, but when I try to always reply in plain text (changing the comment line in the code), it still opens a reply window in html. Any thoughts?

    • Diane PoremskyDiane Poremsky says

      is it opening a window or using the reading pane reply? The macro should open in a new windows when it runs, even if the option to use reading pane reply is enabled.

  9. Ben says

    Thanks for the quick reply. It's opening a window to reply (even though the option to use reading pane reply is enabled), but it's still html. My code has:

    olFormat = olFormatPlain '(*1) - reply using plain text
    'olFormat = olFormatHTML '(*2) - reply using HTML

    I followed the suggestion given by @David Lee here, https://techniclee.wordpress.com/2012/08/02/how-to-force-all-plain-text-messages-to-html-format/, about inserting the code 'Msgbox "Macros are enabled."' into the startup to confirm that Macros are enabled, and they are.

    I'm running Office 15.0.4701.1002 on Windows 7 (32 bit). Any ideas?

    • Diane PoremskyDiane Poremsky says

      Opening a new window is normal with the code - reading pane compose is not fully supported by vba.

      Hmm. it's not converting messages on my outlook 2013 system either. I'll look into it.

  10. Ben says

    Sorry I thought I replied, but the comment system seemed to glitch: It's opening a new window, but it's still using html. Any thoughts?

    • Diane PoremskyDiane Poremsky says

      Ok... it looks like its a problem with the reading pane compose feature - if i open the message then reply, the macro works. If i turn off reading pane compose, the macro works.

  11. Ben says

    Thanks! I turned off the reading pane compose option (File -> Options -> Mail -> Replies and forwards -> Check 'Open replies and forwards in a new window' option) and now it works.

  12. Martin says

    Hi, this is working great for me.
    I'm wondering if you can provide some code to force any new emails to automatically select HTML?
    I know there is an option for setting a default, however, my company in its wisdom has decided to lock that to plain text (they live in the past), which is a pain as formatting can help convey key information quickly.
    Thanks in advance.

Leave a Reply

Please post long or more complicated questions at OutlookForums by Slipstick.com.

If the Post Comment button disappears, press your Tab key.