Copy paste with line number in Notepad++

Viewed 41279

Can you please tell me how can I copy some lines of code in Notepad ++, along with its lines number ?

That is, supposed I have a code.txt opened by notepad ++ like this (numbers are displayed by using Settings --> Preferences --> Editing --> Display line number):

1 This is line 1
2 This is line 2 
.
.
n This is line n

I want to copy it into a .doc / .odt file so that the line number is included in the result, NOT like this:

This is line 1
This is line 2 
    .
    .
This is line n
3 Answers
Related