locked
How to stop continue numbering? RRS feed

  • Question

  • Hi All,

     

    I have a custom numbering style in my Word Template. Whenever I apply the style for two different lists, it always continue numbering in the second one. For example, If the content is like

    One

    Two

    Some Text paragraph

    Newlist One

    Newlist Two

    When I apply the styles for both the lists seperately, it is changing like the below one when I apply the style for the second list.

    1. One

    2. Two

    Some Text paragraph

    3. Newlist One

    4. Newlist Two

    How can I prevent this continue numbering while applying the style (both through code and manual). Is there any setting in the style itself to prevent this auto continuation?

     

    Thanks in advance,

    Sree.

    Wednesday, July 6, 2011 2:07 PM

Answers

  • Hi Sree

    "Continue numbering" (or not) is direct formatting and very unreliable. Document professionals avoid using it if at all possible.

    The more reliable approach is to set up an outline numbering style. The first level with no number, the second level with the numbering you intend to use, set to restart numbering whenever the first level intervenes in the text. Link each of these two levels to a paragraph style.

    Apply the paragraph style to text between the two lists.


    Cindy Meister, VSTO/Word MVP
    Wednesday, July 6, 2011 4:22 PM

All replies

  • Hi Sree

    "Continue numbering" (or not) is direct formatting and very unreliable. Document professionals avoid using it if at all possible.

    The more reliable approach is to set up an outline numbering style. The first level with no number, the second level with the numbering you intend to use, set to restart numbering whenever the first level intervenes in the text. Link each of these two levels to a paragraph style.

    Apply the paragraph style to text between the two lists.


    Cindy Meister, VSTO/Word MVP
    Wednesday, July 6, 2011 4:22 PM
  • Thanks a lot Cindy. I am looking into this, will get back to you if I am not able to resolve it.

    Thanks,

    Sree.

    Thursday, July 7, 2011 10:17 AM
  • Hi Cindy,

    Since we need to save the numbering style in the dotx file, I am not able to create a new multi level style and save it in the dotx file with a particular name. So I am not able to re-use the style wherever required. Do you have any suggestions for this?


    Thanks a lot. Sree
    Friday, August 12, 2011 12:18 PM
  • I don't understand the problem.


    Cindy Meister, VSTO/Word MVP
    Friday, August 12, 2011 12:22 PM
  • I am sorry about that Cindy. Let me put it in detail. I have a source document where I have content controls for entering data in a structured way. Authors can enter data there and save the document. If they choose publish to format 1, I am using a dotx file where I have pre-defined set of styles and I have to publish the content from the source document to the destination one and set the destination style names based on some checks.

    So, I am navigating through all the content controls in the source document and setting the content in the destination document as destinationRange.FormattedText = sourceRange.FormattedText. If there is a list I need to change the style as "Format List 1" in the destination document. If there is one more list, When I apply the same style for the next available list, it continues the numbering.

    I cannot reset all the list starts, because in certain cases, the source document might continue the numbering. How can I achieve this. It will be of a great help if you can help me with this.

    Thanks,

    Sree


    Thanks a lot. Sree
    • Edited by Sreetharan S T Tuesday, August 16, 2011 10:39 AM changed the question
    Tuesday, August 16, 2011 5:20 AM
  • Hi Sree

    You can certainly save the list in the template, but it won't be a "style" in the strict sense of the term.

    You can only save numbering as a ListTemplate. This can be created and stored in the document. If appropriate, this can be linked to paragraph styles (one for each numbering level). Any document created from the template will inherit the ListTemplate as well as the paragraph styles.


    Cindy Meister, VSTO/Word MVP
    Wednesday, August 17, 2011 4:56 PM