Line Numbers Dialog
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 . To do this, provide Bars or Ribbon UI for the RichEditControl (see How to: Create Separate Command UI for a Rich Text Editor, and create the Page Setup toolbar or ribbon page group from the Page Layout group of bars.
End-users can invoke this dialog by clicking Line Numbers on the Page Layout ribbon tab and selecting Line Numbering Options... from the invoked drop-down list. Refer to the Lesson 1 - Create a Simple Rich Text Editor for details on how to provide the ribbon UI for the RichEditControl. Executing the ShowLineNumberingFormCommand command invokes this dialog as well.
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.