none
Two different options for one ListLevel RRS feed

  • Question

  • Hi,

    I am working with Styles and ListLevels which is all working fine. 

    What I now want to achieve is 2 different styles for the second ListLevel. Below should show my variants which I want.

    1. This is heading 1 Listlevel[1]

    1.1 This is ListLevel2 Paragraph ListLevel[2]

    2. This is heading 1 again Listlevel[1]

    [so far so good]

    [Now I want to achieve the following as well as the above]

    2.1 This is  heading 2, different but still ListLevel[2]

    2.1.1 This is ListLevel3 Paragraph.

     

    As you can see 1.1 and 2.1 are different, one is a paragraph and one looks the same as the heading.

    I am creating the 1.1 paragraph using the code

     

    StyleList.ListLevels[2].LinkedStyle = "ReportPara2";
    StyleList.ListLevels[2].NumberFormat = "%1.%2.";
    StyleList.ListLevels[2].TextPosition = oWord.CentimetersToPoints(2);
    StyleList.ListLevels[2].Font.Color = (Word.WdColor)6226958;
    StyleList.ListLevels[2].Font.Size = 12;
    StyleList.ListLevels[2].Font.Bold = -1;
    StyleList.ListLevels[2].ResetOnHigher = 1;
    StyleList.ListLevels[2].StartAt = 1;
    StyleList.ListLevels[2].NumberStyle = Word.WdListNumberStyle.wdListNumberStyleArabic;
    


     I would like to have another ListLevels[2] which is more like my ListLevels[1] which is a header and pick which I want to apply to each paragraph.

     

    I have tried creating a second ListTemplate called HeadingList so one stores the Headers and one store the Paragraphs formats. The problem I've found with this is I can't seem to make the numbers from both ListTemplates follow together.

     

    Does anybody know any suggestions at all?

     

    Thank you so much for any assistance.

    Wednesday, January 18, 2012 7:48 PM

All replies

  • Hi Forgery23,

    After reading your post, I am still not very clear about the problem.

    1. Could you show us the steps about how to reproduce the scenario? 

    2. What is the version of your word application and what is the type of the project?

    3. How did you create the ListTemplate called the HeadingList?

    I guess you may want to create Numbered List in word, if so, please refer to this thread:

    http://stackoverflow.com/questions/1939995/numbered-list-in-microsoft-word

    Best Wishes,


    Learn a lot from others.
    Friday, January 20, 2012 8:34 AM
  • Hi Forgery

    I've been thinking about this since yesterday, trying to figure out a way it might be possible, but it simply is not possible to have the "alternate" formatting applied automatically and have the numbering the way you envision. You'll need to apply the Bold formatting as a character style on top of the Heading style's formatting.


    Cindy Meister, VSTO/Word MVP
    Friday, January 20, 2012 1:48 PM
    Moderator
  • Hi Cindy,


    Thank you very much for your response. I'm glad it's not just been me struggling with this.

     

    Applying the formatting separately may have to work then. I'm going to have a play with it now because I need to resolve how to do this.

     

    Thank you so much for your assistance!

    Saturday, January 21, 2012 2:32 PM
  • Hi Forgery

    The people who work with numbering on a regular and intensive basis (independent of programming) can be found in the Answers forum. Someone there might have a suggestion as to how it could best be done in the UI:

    http://answers.microsoft.com/en-us/office/forum/word

    If it can be done in the UI, it can be programmed, once the "trick" is known...


    Cindy Meister, VSTO/Word MVP
    Sunday, January 22, 2012 7:10 AM
    Moderator