Is it possible to add custom numbering with characters or words?

I want to generate the word document with the list numbering in nepali language i.e. १,२,३,४ or क,ख,ग instead of 1,2,3,4. Is this possible ?

4 Replies 1 reply marked as answer

HC Hemalatha Chiranjeevulu Syncfusion Team April 1, 2021 08:37 PM UTC

Hi Dinesh,

Thank you for contacting Syncfusion support.

Currently, we are checking on your query and will update you with more details on 5th April 2021.

Please let us know if you have any other questions.

Regards,
Hemalatha C 



HC Hemalatha Chiranjeevulu Syncfusion Team April 5, 2021 02:56 PM UTC

Hi Dinesh,

Thank you for your patience.

From the details, we have found that your requirement is to set the list number in Nepal language. To meet your requirement, we suggest you to set the font name as "FONTASY_HIMALI_TT" for list numbers. Please refer the below code snippets to set the list numbers in Nepali language:


 
//Creates a new Word document  
WordDocument document = new WordDocument(); 
//Adds new section to the document 
IWSection section = document.AddSection(); 
//Adds new paragraph to the section 
IWParagraph paragraph = section.AddParagraph(); 
//Applies default numbered list style 
paragraph.ListFormat.ApplyDefNumberedStyle(); 
//Adds text to the paragraph 
paragraph.AppendText("List item 1"); 
//Gets current list style of the paragraph 
ListStyle listStyle = paragraph.ListFormat.CurrentListStyle; 
WListLevel levelOne = listStyle.Levels[0]; 
//Sets font for the list number 
levelOne.CharacterFormat.FontName = "FONTASY_HIMALI_TT"; 
levelOne.NumberSuffix = ""; 
//Adds second paragraph 
paragraph = section.AddParagraph(); 
paragraph.AppendText("List item 2"); 
//Continues last defined list 
paragraph.ListFormat.ContinueListNumbering(); 
//Adds new paragraph 
paragraph = section.AddParagraph(); 
paragraph.AppendText("List item 3"); 
//Continues last defined list 
paragraph.ListFormat.ContinueListNumbering(); 
//Saves the Word document 
document.Save("Sample.docx", FormatType.Docx); 
//Closes the document 
document.Close(); 

Please let us know if you have any other questions.

Regards,
Hemalatha C



Marked as answer

DK DINESH K April 5, 2021 03:17 PM UTC

Thank you for your response. It worked. 😊😊😊


HC Hemalatha Chiranjeevulu Syncfusion Team April 6, 2021 07:47 AM UTC

Hi Dinesh,

Thank you for your update.

We are glad to know that your problem has been fixed.

Please let us know if you need any further assistance. We are happy to assist you as always.

Regards,
Hemalatha C



Loader.
Up arrow icon