Skip to main content
All docs
V25.1
  • SECTIONPAGES

    Non-MailMerge Field

    { SECTIONPAGES }

    Inserts the total number of pages in a section.

    Example:

    The field code

    Page { PAGE } of { SECTIONPAGES }

    displays text such as Page 5 of 10 on each page of a document section.

    The SECTIONPAGES field is layout-dependent. If this field is located outside the main document body (header/footer, endnote/footer, comment, or text box), use Layout API to get the field result. Obtain the PlainTextBox related to the field and call the DocumentLayout.GetText(LayoutElement) method (or use the PlainTextBox.Text property) to retrieve the field result.