Numbering - Continue Numbering

  • Hi,

    I am trying to implement a "Continue Numbering" function as you get with Word's outline/numbering. So for example, if you have the following:

    1 Para 1
    2 Para 2
    3 Para 3

    Some arbitrary text

    1 2nd para 1
    2 2nd Para 2

    By clicking on the continue numbering function, I could make the number for 2nd para 1 be number 4 instead of number 1.

    The only way I could find of implementing this was by querying the previous paragraphs before 2nd para 1. My code is as follows:


    The function is failing at ts.AGet(WPAT_NumberText, num).

    Questions are:

    1 In principle, am I going about this the right way and
    2 How should I be getting the number of the last outline as the AGet function is not working.

    Thanks,

    Mark

  • Hi Julian,

    My restart and continue functions now appear to work reasonably well, but there is one issue I am not sure how to overcome.

    If I put a couple of non-numbered paragraphs between numbered paragraphs and then make the last para a numbered para, my continue numbering works but updating the previous list does not update the later list.

    Eg

    1 Para 1
    2 Para 2
    3 Para 3

    Blah...
    Blah...

    1 Para 4

    My continue numbering function will correctly update para 4 so that it is numbered 4. However, there is no connection between the first list and the second list so that if I add a new para to the first list so that its last numbered para becomes 4, the second list's numbering does not advance. Obviously because wpTools is treating it as a separate list. Is there some property that can be set so that the second list becomes a continuation of the first list?

    Regards

    Mark

    • Offizieller Beitrag

    Hi,

    Zitat

    Is there some property that can be set so that the second list becomes a continuation of the first list?

    This is usually the expect behavior. If you use outline numbering (with the number styles using a group) it is different.

    You can try wpfAutoRestartSimpleNumbering and wpfSimpleNumberingPriorityOverOutlines in FormatOptionsEx, also see the source in WPRTEDefs when seraching for wpfSimpleNumberingPriorityOverOutlines.

    Julian