Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Fri Jan 21, 2011 2:22 am

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

moonsky
 
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