Reset Page Numbering for Sections

  • Hi Julian,

    I've queried the WPTools5 (VCL) forum for wpsec_ResetPageNumber and found 4 posts. 2 of the posts end with the poster having an unanswered question.

    I can't seem to get to the bottom of what it takes to get page numbers (both page and page count) to reset for each appended section. I've seen fragments of instructions saying to add wpsec_ResetPageNumber to the Section.Select after FastAppendText, to use 'sectionpages' instead of 'numpages' for field type (which this works, but only for page count, not page), and to add code to the OnCalcPageNr event.

    I even simply modified your sample mailmerge project, Task MailM4. I added the page and page count to the editor and then modified the Section.Select line to be

    Section.Select := [wpsec_ResetOutlineNums, wpsec_ResetPageNumber];

    in the Button1Click event.

    No luck.

    I sent an email to a person who posted about wpsec_ResetPageNumber to see if they ever got it to work. Unfortunately, they told me they gave up.

    I'd like to believe there's an easy way to accomplish this.

    Please help. I understand you're busy, but if you could give a complete answer, even for the MailM4 task, it would be appreciated.

  • Thanks for the quick response. I will plan on upgrading in the near future.

    However, for the time being, I wouldn't mind trying to tackle the problem with WPTools5. It sounds like you had an intent for wpsec_resetpagenumber to aid in the resetting of the current page number for sections. However, looking at the other posts, I'm still not able to figure out how to do this. Others have asked how to do this as well.

    This subject is confusing because the object SECTIONPAGES works regardless of wpsec_resetpagenumber.

    Is there anything more you can offer on this subject? Otherwise, I'm sure I can figure out another solution, I'd just hate to re-invent the wheel.

    Thanks,
    Alan

    Einmal editiert, zuletzt von acarlton (27. Januar 2009 um 13:26)

    • Offizieller Beitrag

    Well,

    Many customers got an upgrade to WPTools 6 due to the long "introdcution" phase. Also Your company, if I read your e-mail correctly. The contact e-mail is registered to somebody else, are there more developers in the company?

    You can download the WPTools V5.47.5 or WPTools V6.02. Both inclode the usage of the added variable "PageNrAsDefined" which is addded to the page object.

    You can see that in unit WPRTEPaint.PAS.

    Regards,
    Julian