Syntax highlighting when pasting into emails

5 years too late, sorry, but I've a much simpler solution than the accepted answer.

Use this online tool: http://tohtml.com/

copy the preview from your browser window and just paste into Word or Outlook.


Late but I can give an answer that works. You need 2 things

  1. putty
  2. access to some Unix server (With vim)

In putty options, Under window → selection , turn the check box on for

Paste in to clipboard in RTF as well as plain text.

Log on to the server using putty. start vim by typing vim Paste your text (for example XML ) in to vim. enter command mode (of vim by pressing ESC) and type :set syn=xml.

Syntax highlighting kicks in. Copy the text using mouse and paste it into your email.