Object CurrentPage = .WdFieldType. Object TotalPages = .WdFieldType.wdFieldSectionPages use the field SectionPages instead of NumPages If the total pages should not be the total in the document, just the section So that the footer content doesn't propagate to the previous sectionįtr.PageNumbers.RestartNumberingAtSection = true Insert Next Page section break so that numbering can start at 1 .Range. In the header/footer field that appears after the section break (usually page 2 of the template), enter the text you want in the header/footer (or leave. In the inserted template, place a next-page section break at the start of the template. In the Page Setup group, click Breaks, then under Section Breaks, select Next Page. (Make sure the cursor is outside of the footer area.) On the ribbon, select the Page Layout tab. In the parent template, define the header/footer. To create a new section and disconnect the footers, follow these steps: Insert your cursor at the bottom of the last page of the previous chapter or section. Go to page where page numbering should start To use different headers in your inserted templates. Note I also changed the assignment to TotalPages on the assumption the total page count should be that of the new section, not of the entire document. The follosing example demonstrates how to insert a "Next Page" section break just before the target page, then format the new section's footer for page numbering to start in the section at 1. In order to (re-)start numbering in the document a Section Break is needed.
0 Comments
Leave a Reply. |