How to Keep Original Line Numbers When Copying Text in Word
Question details
The user needs to copy specific text ranges from a document while retaining their original line numbers (e.g., lines 6-20, 90-93) without the numbering restarting at 1.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Copying segments of text from a document that has line numbering enabled to paste them into another document or application.
- Observed behavior
- When copying and pasting the highlighted lines, the numbering automatically resets and restarts at 1 because the application treats line numbers as document formatting rather than plain text.
Ensure your source document has the correct line numbering applied and identify the exact line ranges you need to extract before proceeding.
Export the Document to PDF Before Copying
Converting the document to PDF bakes the line numbers into the layout, allowing you to copy both the text and the corresponding numbers accurately.
Because word processors handle line numbers as dynamic formatting, saving the file as a PDF forces the numbers to become selectable text elements alongside your actual document content.
Ensure your source document has line numbers turned on by navigating to the Layout tab and selecting Line Numbers.
Go to File > Export or File > Save As, and choose PDF as the file format to save a copy of your document.
Open the newly created PDF file, highlight the specific text ranges you need (the line numbers will now be highlighted as well), and copy them.
Paste the copied content into your destination document. The original line numbers will be preserved as plain text.

Insert a Screenshot for Exact Visuals
If you do not need to edit the text later, taking a screenshot is a fast way to capture specific line ranges exactly as they appear.
Manage Line Numbers Seamlessly with WPS Writer
WPS Office offers robust word processing capabilities, including advanced line numbering and a built-in PDF converter that makes extracting and formatting numbered text straightforward and free.
- 1. Open document: Open your .docx file in WPS Writer.
- 2. Apply line numbers: Navigate to the Page Layout tab and select Line Numbers to apply continuous or page-specific numbering.
- 3. Export to PDF: Click the Menu button and select 'Export to PDF' to convert the file seamlessly.
- 4. Copy original text: Open the generated PDF using WPS Office's PDF reader and copy the text with its locked-in line numbers.

Frequently Asked Questions
Why do my line numbers restart at 1 when I copy and paste?
Word processors treat line numbers as a page layout formatting property, not as actual typed text. When pasted into a new document, the line formatting resets based on the destination document's default settings, which usually starts at 1.
Can I automatically convert line numbers to regular text in Word?
There is no direct built-in button to convert automated line numbers to plain text. The most reliable workaround to extract them as text is exporting the document to PDF and copying the text from the resulting file.
Is there a way to paste text and maintain the exact line number format without converting to PDF?
If you want to avoid PDF conversion, you can take a screenshot of the text block and paste it as an image. However, the text will become a static picture and cannot be edited, formatted, or searched.




