Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicates:
Syntax highlighting in Microsoft Office Word
How do I easily highlight the syntax of PHP code in Word?

When I send email to someone with source snippet then how to format source code like this type. with line number

alt text

share|improve this question

marked as duplicate by fretje, Gnoupi, random Mar 29 '10 at 7:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

see:… (as word is normally used as the editor for outlook mail...) – fretje Mar 29 '10 at 7:17

Some text editors will let you copy syntax-colored text as HTML. Editplus is one, using the menu Edit -> Clipboard -> Copy as HTML. It doesn't do line numbers though.

share|improve this answer
Vim and emacs can do this also. In vim you use :tohtml, in emacs, use the htmlize package. – DaveParillo Mar 29 '10 at 5:15
Notepad++ offers the functionality to insert line numbers into the text in an additional step. Maybe Editplus can do the same. – foraidt Mar 29 '10 at 6:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.