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

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.


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.

  • 1
    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
  • 2
    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.