Formatting Issues

How to Keep Original Line Numbers When Copying Text in Word

Muhammad TalhaMuhammad Talha Oct 21, 2026 869 views

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.

How to Keep Original Line Numbers When Copying Text in Word
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.
Before you start

Ensure your source document has the correct line numbering applied and identify the exact line ranges you need to extract before proceeding.

Solution 1Recommended

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.

1
Enable line numbering

Ensure your source document has line numbers turned on by navigating to the Layout tab and selecting Line Numbers.

2
Export as PDF

Go to File > Export or File > Save As, and choose PDF as the file format to save a copy of your document.

3
Copy from the PDF

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.

4
Paste into the target destination

Paste the copied content into your destination document. The original line numbers will be preserved as plain text.

Export the Document to PDF Before Copying
Editable Text Preserved: This method ensures your text remains fully editable while perfectly preserving the original numbering sequence from the source document.
Efficient Document Formatting

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. 1. Open document: Open your .docx file in WPS Writer.
  2. 2. Apply line numbers: Navigate to the Page Layout tab and select Line Numbers to apply continuous or page-specific numbering.
  3. 3. Export to PDF: Click the Menu button and select 'Export to PDF' to convert the file seamlessly.
  4. 4. Copy original text: Open the generated PDF using WPS Office's PDF reader and copy the text with its locked-in line numbers.
Easily add, customize, and format line numbers for legal or academic documents.Built-in 1-click PDF export effortlessly preserves layout and numbering.Highly compatible with Microsoft Word (.docx) formats.Lightweight, fast, and free to use.
microsoft office alternative - wps office

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.