How to Insert a Source Code Into an Outlook HTML Email Message

Written by craig witt
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Insert a Source Code Into an Outlook HTML Email Message
Insert source code into HTML e-mails in Outlook. (laptop image by Ewe Degiampietro from

Microsoft Outlook is one of the leading personal information management programs. Included in the Microsoft Office suite of productivity products, the program allows users to send, receive, search and manage e-mail messages and attachments. It also offers tools to create and manage calendars, address books, to-do lists, tasks and notes. A simple font change allows you to insert source code into HTML e-mail messages in a manner that retains the proper spacing, indentation and character formatting of the original code.

Skill level:


  1. 1

    Open the file containing the source code you want to include in your Outlook HTML message.

  2. 2

    Highlight the code you want to include in the message. Right-click the highlighted code and select "Copy," or choose the "Copy" option from within the "Edit" menu at the top of the screen.

  3. 3

    Open Microsoft Outlook.

  4. 4

    Press the "Ctrl" and "N" keys simultaneously to create a new e-mail message.

  5. 5

    Select "HTML" from the drop-down menu near the top of the newly created message window in Outlook 2003 and earlier Outlook versions to set the email format to HTML. In Outlook 2007, click the "Options" tab near the top of the window and then click "HTML" within the "Format" subsection.

  6. 6

    Right-click within the message window and select "Paste" to insert the source code you copied in step 2.

  7. 7

    Highlight all of the code you pasted in the previous step to select it.

  8. 8

    Click the font drop-down menu near the top of the message window and select a fixed-width font to ensure correct spacing, indentation and character formatting. Courier New is the most commonly used fixed-width font; it is available on all versions of Microsoft Windows. Your source code is now ready to be sent in an HTML-formatted e-mail using Microsoft Outlook.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.