Free Support Forum - aspose.com

Number of paragraphs

Hi, can you tell me how can I get number of paragraphs in some document, but without iterating through it.<br><br>Thanks.<br>

Hi

Thanks for your inquiry. I think that you can try using the following code.

Document doc = new Document(@"273_105760_tanquan\in.doc");

NodeCollection paragraphs = doc.GetChildNodes(NodeType.Paragraph, true)

int parCount = paragraphs.Count;

Best regards.