The Line Numbers dialog enables end-users to switch on or suppress line numbering in a document, and specify different line numbering options.

You can provide end-users with the capability to invoke the Line Numbers dialog via the Page Setup toolbar or Ribbon page group. To do this, provide Bars or Ribbon UI for the RichEditControl (see Lesson 4 - Provide a Bar UI for a Rich Text Editor or Lesson 5 - Create Separate Ribbon Pages for a Rich Text Editor), and create the Page Setup toolbar or ribbon page group from the Page Layout group of bars.
To invoke the Line Numbers dialog, use the ShowLineNumberingFormCommand command.
To programmatically get or set the line numbering parameters (Start at, Count by, From text, Numbering), use the SectionLineNumbering.Start, SectionLineNumbering.CountBy, SectionLineNumbering.Distance, SectionLineNumbering.RestartType properties of the SectionLineNumbering object accessed via the Section.LineNumbering property of the document section.