none
Reduce space between a numbered bullet and a text programatically RRS feed

  • Question

  • Hi All,

    I have a table that has a column,like this

    1.1.1.  hi

    1.1.2.  hello 

    '

    '

    1.1.11            hi ====> here we can see there is suddenly so much space between number and the text.

    otable.Range.Paragraphs.TabStops.Add(some value, Word.WdTabAlignment.wdAlignTabLeft); also doesn'nt seem to work.

    How can I reduce this spacing using c# ? Any help is unconditionally appreciated.Thanks in advance ! 


    Monday, February 9, 2015 7:01 PM

Answers

  • Hi Apoorva

    What you're seeing is a result of how numbering is structured to lay out. It's difficult to explain, so I recommend you look at the dialog box where this can be configured by an end-user. You can find it via Home/Paragraph/Multilevel list/ Define new multilevel list. Click the "More" button to get all the options. You can experiment with changing the settings, here, to better understand how the design works.

    The options that control where the text aligns are: Number alignment, Aligned at, Text indent at, Follow number with, Add tab stop at.

    The behavior you're seeing will happen when the number overlaps with the setting for the Tab stop position and "Text indent at" (assuming they're the same, as they are by default). If you don't want this to happen, then you need to change these setting for all levels for the list style/template you show us. They correspond to the object model members ListLevel.TextPosition and ListLevel.TabPosition


    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, February 12, 2015 8:26 PM
    Moderator

All replies

  • Hi,

    Is it the whitespace?

    If so, I did many test to change alignment, but it doesn’t work. I think you could iterate Lists, then remove the whitespace by using Trim method and reset the value with new value.

    To get the Lists in the document, you could use Lists object:

    # Lists Object (Word)

    https://msdn.microsoft.com/en-us/library/office/ff192148.aspx

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, February 10, 2015 9:25 AM
    Moderator
  • Thanks a lot Starain :) I will look at this link 
    Tuesday, February 10, 2015 3:48 PM
  • Hi Apoorva

    What you're seeing is a result of how numbering is structured to lay out. It's difficult to explain, so I recommend you look at the dialog box where this can be configured by an end-user. You can find it via Home/Paragraph/Multilevel list/ Define new multilevel list. Click the "More" button to get all the options. You can experiment with changing the settings, here, to better understand how the design works.

    The options that control where the text aligns are: Number alignment, Aligned at, Text indent at, Follow number with, Add tab stop at.

    The behavior you're seeing will happen when the number overlaps with the setting for the Tab stop position and "Text indent at" (assuming they're the same, as they are by default). If you don't want this to happen, then you need to change these setting for all levels for the list style/template you show us. They correspond to the object model members ListLevel.TextPosition and ListLevel.TabPosition


    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, February 12, 2015 8:26 PM
    Moderator
  • Thanks a lot Cindy I got a much better understanding of what  exactly is happening after reading this.
    Friday, February 13, 2015 6:29 AM