Select the text you want.
Click the Page Layout tab. Then click the Line Numbers button.
Click None to remove line numbers from the document.
Click Continuous to add line numbers to the document starting from line 1.
Click Restart Each Page to restart line numbers on each page.
Click Restart Each Section to restart line numbers at each section.
Click Suppress for Current Paragraph to remove line numbers from the selected text.