在我的要求中,我想重复一个特定的段落,该段落位于 word 文档的部分中。这里的word文档分为几个部分,在部分我们有如下段落
#Section Start
1) TO RECEIVE AND ADOPT FINANCIAL STATEMENTS FOR THE YEAR ENDED [FYE]
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
我想将“a”点重复 3 次
我尝试了下面的代码
// 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);
System.Data.DataTable dt = GetDataTable(); //Sample DataTable which is having Keys and Values
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;
}
}
请帮助我如何重复一段。