I have 2 Requirements
- I want to repeat a particular paragraph which is in section in a word document.
here word document divided into sections, in sections we have paragraphs like below
Ex:-
Section start
a.That the Financial Statements of the Company for the financial year ended [FYE] together with the Director(s)’ Report and Statement thereon be hereby received and adopted.
b. Second paragraph.
c. Third paragraph.
Section end
above case i want to repeat “a” point
- I want to repeat a particular paragraph which is in a paragraph(para in a para) all are under a section
Ex:-
Section Start - TO RECEIVE AND ADOPT FINANCIAL STATEMENTS FOR THE YEAR ENDED [FYE]
a. First paragraph.
b. That the Financial Statements of the Company for the financial year ended [FYE] together with the Director(s)’ Report and Statement thereon be hereby received and adopted.
c. Third paragraph.
#Section End
here i need to repeat “b” point
PageNumberFinder finder = new PageNumberFinder(doc);
// Split nodes which are found across pages.
finder.SplitNodesAcrossPages(true);
// Copy all content including headers and footers from the specified pages into the //destination document.
ArrayList pageSections = finder.RetrieveAllNodesOnPages(1, doc.Sections.Count, NodeType.Section);
// Sample DataTable which is having Keys and Values
System.Data.DataTable dt = GetDataTable();
int sectionCount = 0;
foreach (Section section in pageSections)
{
NodeCollection paragraphs = section.GetChildNodes(NodeType.Paragraph, true);
for (int i = 0; i < paragraphs.Count; i++)
{
string text = paragraphs[i].Range.Text;
if (i == 10)
// Here i need to add 10th Para to Section in both cases
}
}
Please help me how to do ?