// 从第二节开始,在每一页的页脚插入页码
for (int i = 1; i < doc.Sections.Count; i++)
{
Section section = doc.Sections[i];
HeaderFooter footer = section.HeadersFooters.Footer;
Paragraph footerPara = footer.AddParagraph();
footerPara.AppendField("页码", FieldType.FieldPage);
footerPara.AppendText(" / ");
footerPara.AppendField("总页数", FieldType.FieldNumPages);
footerPara.Format.HorizontalAlignment = HorizontalAlignment.Center;
}
这个是我的代码,我是从第二节开始循环的,但是第一节也同样插入了页码,可以帮我解决一下吗。