Topic
9 replies Latest Post - ‏2014-02-08T18:41:09Z by kirandasari
SystemAdmin
SystemAdmin
1299 Posts
ACCEPTED ANSWER

Pinned topic Restart Total Pages Number

‏2013-02-06T16:09:48Z |
Hi, I have a template which pulls in data from DOORS, and I have created multiple Master Pages to create attachments to the main document. I would like to restart the 'Page Number' and to'Total Pages Number' at the beginning of each Master Page so that the attachments have a unique numbering. I was able to restart 'Page Number' by setting the "restart page numbering" property to "true", but have been unable to restart 'Total Pages Number'.

Any help would be very much appreciated.

thanks!
Updated on 2013-02-07T14:24:35Z at 2013-02-07T14:24:35Z by SystemAdmin
  • Dragos.Cojocari
    Dragos.Cojocari
    1604 Posts
    ACCEPTED ANSWER

    Re: Restart Total Pages Number

    ‏2013-02-06T16:19:47Z  in response to SystemAdmin
    Hey Stefanie,

    I assume you mean to have a "total page number" per section. If that can be done in Word you can do it in RPE too since for the Word and PDF outputs the page number and total pages number elements in RPE are just shortcuts for Microsoft Word's Page Number and Total Page Number fields. This means that if you know how to achieve this using fields in Microsoft Word you should use the field code that you craft there and use it in the template in place of the Total Page Number.

    Regards,
    Dragos

    RPE Actual
    • SystemAdmin
      SystemAdmin
      1299 Posts
      ACCEPTED ANSWER

      Re: Restart Total Pages Number

      ‏2013-02-06T16:37:58Z  in response to Dragos.Cojocari
      Thanks for responding. Your assumption is correct. The microsoft office field code for total pages number is {NUMPAGES]. I have inserted the field icon from the palette into my Master Page, and set the field code to {NUMPAGES}.

      In the Template Content, the master page is called by the Container, but the total pages number does not appear in the word output. I could post the template if that would be helpful.

      thanks!
    • SystemAdmin
      SystemAdmin
      1299 Posts
      ACCEPTED ANSWER

      Re: Restart Total Pages Number

      ‏2013-02-06T16:58:27Z  in response to Dragos.Cojocari
      I was able to find a fix for the total page count in my second master page at the following site, but the solution says to have no page count on the first master page, but I do need to count the number of total pages in the document prior to the start of the attachment (when the second master page is called).

      http://www-01.ibm.com/support/docview.wss?uid=swg21430909
  • Dragos.Cojocari
    Dragos.Cojocari
    1604 Posts
    ACCEPTED ANSWER

    Re: Restart Total Pages Number

    ‏2013-02-07T13:26:46Z  in response to SystemAdmin
    Hey Stefanie,

    the "Total Page Number" is translated by RPE in the {NUMPAGES} field. That field counts all the pages in the Word document. If you want to count only the pages in the current section than you need to use the {SECTIONPAGES} field. An example is attached that shows how to use this. The example generates has 2 sections, in the first section it generates 15 paragraphs ( using a do-while container) and in the second section it generates 30 paragraphs ( using a do while container). The footer of each section shows the current page ( which resets at the beginning of the section), the section's page count and the document's page count. The Word output from my machine is also attached.

    Note that with the exception of the a few fields, the generated Word document will not show any other fields unless you explicitly update them, manually ( select all and press Ctrl+F) or through a macro. The fields used in the example are amongst those that can be automatically updated by Word without additional actions.

    Regards,
    Dragos

    RPE Actual
    • SystemAdmin
      SystemAdmin
      1299 Posts
      ACCEPTED ANSWER

      Re: Restart Total Pages Number

      ‏2013-02-07T13:39:27Z  in response to Dragos.Cojocari
      Hi Dragos,

      Thanks, that is very helpful and I was able to use the SectionPages field to count the total number of pages in each section. However, what I need to do is have some items in section 1 begin on a new page. In using your attached file as an example, I want the text of section 1 to be on a seperate page from the heading of section 1 (but have them both contained within section 1 with continuous page numbering). I have tried Section and Page breaks, but it forced a new section and thus a new page numbering. How can this be done correctly?

      thanks!
    • SystemAdmin
      SystemAdmin
      1299 Posts
      ACCEPTED ANSWER

      Re: Restart Total Pages Number

      ‏2013-02-07T14:08:40Z  in response to Dragos.Cojocari
      I have attemped to use your method in my example which is attached. There are two problems now that I am having 1) I would like the table in section 1 to begin on a new page, still in Section 1. and 2) The Section Page count in Section 2 is not displaying the correct number of pages in section 2. If you could take a look at this, I would very much appreciate it.

      thank you so much for you help

      Attachments

  • Dragos.Cojocari
    Dragos.Cojocari
    1604 Posts
    ACCEPTED ANSWER

    Re: Restart Total Pages Number

    ‏2013-02-07T14:21:19Z  in response to SystemAdmin
    Hey Stefanie,

    the section page count is incorrect since the field code you used is incorrect, it is SECTIONPAGES not Section Pages.

    To have the paragraph on a new page in the same section put a Page Break element from the palette right before it. Don't use a section break since that creates a new section and that's not what you want.

    Regards,
    Dragos

    RPE Actual