- Code: Select all
Spire.Doc.Document document_spire = new Spire.Doc.Document(filename);
foreach (Spire.Doc.Section section in document_spire.Sections)
{
//Get Each Paragraph of Section
foreach (Spire.Doc.Documents.Paragraph paragraph in section.Paragraphs)
{
...
// /* do some processing with the paragraph */
Console.WriteLine("Pagenumber of Paragraph");
}
}
If using Microsoft.Office.Interop.Word in C#, I can do that:
- Code: Select all
private static int GetPageNumberOfRange(Word.Range range)
{
return (int)range.get_Information(Word.WdInformation.wdActiveEndPageNumber);
}
But how to do with Spire.doc?
Thank you!