Outlook 2007: Edit your Messages HTML Source

A thing that can drive you crazy while using Outlook 2007 is the "Edit Source" feature missing.
If you are using outlook the way i do, you probably want your messages to be exactly as you think they should.

Please Read this:
if you are not familiar with VBA macro editing and this article is too much for you,
you can buy a ready made Outlook Addin that will give you this feature and much more, this Addin is only for Outlook 2010 (you might want to upgrade your outlook first..) you can find the addin here: Plimus Secure Web Site




Or Read more about it in this post


it will allow you to:

1. Edit new and received messages HTML Source
2. View new and received messages as plain text
3. View new  and received messages with your default browser
4. View new  and received messages with Word Editor
5. Add an exact copy of the message as word .doc or .rtf attached to it



HTML Editor For Outlook 2010
Edit HTML Source

A discount coupon is available for my blog readers, just send me an email and i'll reply it to you.

If you do want to try it yourself, Go ahead and continue:


In some cases (indeed special cases - but they exist) you want the ability to edit your HTML source of the message, so here is the way to do it:

first, Open your Outlook 2007 and launch the VB Editor (alt-F11)

open your Outlook VB Editor to add the HTML Edit Macro

Click the "Insert" Menu and select "Module" to add a new module,

add a module for the new HTML Edit Macro

And add the following code:

Sub EditHTML()
Dim mit As MailItem
Dim fname As String
Dim fcon As String
If Application.ActiveInspector.CurrentItem.Class <> olMail Then
MsgBox "The HTML Code cannot be edit for this item." & vbCrLf & "Only Mail Items are supported.", vbExclamation, "Edit HTML Error"
Exit Sub
End If
Set mit = Application.ActiveInspector.CurrentItem
fname = Environ$("temp") & "\temptxt.txt"
On Error Resume Next
Kill fname
Open fname For Binary As #1
Put #1, , mit.HTMLBody
Close #1
Shell "notepad.exe " & fname, vbMaximizedFocus
MsgBox "Click OK when Done and the saved HTML will be inserted to your message", vbOKOnly + vbInformation, "Edit HTML"
Open fname For Binary As #1
fcon = Space(LOF(1))
Get #1, , fcon
Close #1
mit.HTMLBody = fcon
End Sub

if you have problem with copy-paste issues, please download the zip file from the link below

Download the EditHTML Module

Close the VB Editor (And save)

Add the "Edit HTML" button to the New message window:
Open a new message,
Click The Ribbon Customization Button



Customize the new message ribbon

Select the "More Commands" Menu

Need to create Barcodes Cheaply? Try this software.

Instead of "Popular Commands" Select the "Macros"

Select The macros commands section

Select the new macro created named "Project1.EditHTML"

Select the EditHTML Macro

Click The "Add" Button, Customize the new button:

Customize the new button

and Click the "OK" button

Now, you have a new icon at the ribbon (for any new message windows)

The new EditHTML button - anchor icon

Just Click it while editing your message

How to use the new button


Now, your Notepad will pop with the HTML source of the message,
just change what ever you need and save the file (File menu-Save) and close the notepad.

you will see (after you close the notepad) that your outlook is waiting with a message box on it,

Click OK to finish the update

Just Click the OK button and the new HTML code you edit will be imported to your message.

That's it,
Hope you will like to use it,

waiting for your comments,

Udi