We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to set constant spacing between between list number and text

Hi,

I want to set constant/consistent spacing between list number and text. For example -

When the number is between 1 and 9 (single digit ) , the space between the number and text is same , but when the number becomes greater than 9 , the spacing is not the same .i.e. spacing between number and text for numbers less than 9 is different to spacing between number and text when the number reaches to 2 digits (greater than 9). It increases when the number reaches 3 digit.

My use case is to have consistent spacing between list number and text irrespective of list number.

Attached document for reference.

Please help.

Numbering100.docx.zip (11.3 KB)

@saurabh.arora,

Thanks for your inquiry. Please use ListLevel.NumberPosition property as shown below to get the desired output. Hope this helps you.

Document doc = new Document(MyDir + "Numbering100.docx");
List list = doc.Lists[0];
list.ListLevels[0].NumberPosition = 36;

doc.Save(MyDir + "18.7.docx");