How to get the paragraph’s header Bullet Number. Example: My word document is:
1. This is header
This is content inside header.
2. This is another header
2.1 This is sub header
Now I want the text including the number in header title.
I have done :
foreach(Paragraph para in doc.GetChildNodes(NodeType.Paragraph,true))
string headerTitle = para.GetText();
But, headerTitle comes as This is header Instead of 1. This is header
Thanks, in advance for any solution
Thanks for your inquiry. You can get the complete text using following code:
Document doc = new Document(MyDir + @“in.docx”);
foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true))
Hope, this helps.
Thanks, Awais Hafeez really helped!