Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files from any .NET platform (C#, VB.NET, ASP.NET, .NET Core) and Java applications (J2SE and J2EE) with fast and high quality performance.

Fri Jan 21, 2011 2:22 am

I want to insert line numbers in the Word. How can I do that with Spire.DOC?
THANKS! :P :mrgreen:

Posts: 9
Joined: Mon Dec 13, 2010 7:39 am

Fri Jan 21, 2011 8:22 am

Thank you for your inquiry!
To do this, you may first set the LineNumberingRestartMode property to make the line number visible. And then, you may use section.PageSetup.LineNumberingStartValue and section.PageSetup.LineNumberingStep properties to control the line number. You can follow the codes below: section.PageSetup.LineNumberingRestartMode = LineNumberingRestartMode.RestartPage;
section.PageSetup.LineNumberingStep = 1;
section.PageSetup.LineNumberingStartValue = 1;
e-iceblue support
User avatar

iceblue support
Posts: 240
Joined: Tue Dec 21, 2010 2:56 am

Return to Spire.Doc