I write a Word 2013 document, where I often use the insert object function. There are also Word 2013 documents to insert, containing source code. For those documents I want to show line numbers in the inserting document. Enabling line numbering in both documents does not work.

Does anybody know how to show line numbering for inserted Word 2013 objects?

3 Answers 3


I found myself a way to show line numbers in INSERTED documents:

  1. Open the document to insert
  2. Create a new style (or modify e.g. style "Normal")
  3. Open Format / Numbering and enable a numbering format of your choice
  4. Save your document
  5. Insert your document and you'll see line numbers for the inserted text
  • Just checked: Works also for Word 2013
    – Clijsters
    Aug 29, 2018 at 8:08

Can you process the files outside of word ?

If you have awk you can run the source code through an awk script which will number it for you. If you are on unix or have a unix like shell:

$ cat source_file | awk '{N++; print N," ",$0}' > numbered_file

Go to PAGE LAYOUT in office 2013 tabs then Line Numbers and then in drop down menu click Line Numbering options.. then in new pop-up window go to layout tab then Line Numbers.., Tick Add line numbering, click OK then you are done


  • Read carefully... You describe a way I've already tried out. Feb 11, 2015 at 9:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .