help-After I set the paragraph style- save it- and open the word- found the title of multilevel list without adding

After I set the paragraph style, save it, and open the word, found the title of multilevel list without adding.

paragraph. ParagraphFormat.StyleName = "header 1"; 
paragraph. ParagraphFormat.StyleName = "header 2"; 
paragraph. ParagraphFormat.StyleName = "header 3"; 

Original text isOriginal text is:
1test1
2.2test2.2
2.2.1test2.2.1
Target textTarget text(The number here is a multilevel listThe number here is a multilevel list)
1 test1
2.2 test2.2
2.2.1 test2.2.1

Hi,

Thanks for your inquiry. I have tired to understand your query and based on my understanding you are facing issue with text formatting with multilevel list. After applying “Heading 1” style, the text become as List. Please see the attached image, the “Heading 1” and “Heading 2” styles in your document has formatting of multilevel List. When you apply this style to a Paragraph, its style will be same as multilevel List.

Hope this answers your query. Please let us know if you have any more queries.

I want by aspose.words complete,can give a code?

Hi,

Thanks for your inquiry. Unfortunately, I have not completely understood your query. It would be great if you please share some more information about your query. We will share the code snippet with you according to your requirements.

If you want to create number lists, please use the following code snippet. I suggest you please read ListLevel.NumberFormat and ListLevel.NumberStyle properties. For complete details about Aspose.Words.Lists namespace, please read following documentation link.
https://reference.aspose.com/words/net/aspose.words.lists/

Please check the following code examples for your kind reference.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Create a numbered list based on one of the Microsoft Word list templates and
// apply it to the current paragraph in the document builder.
builder.ListFormat.List = doc.Lists.Add(ListTemplate.NumberArabicDot);
// There are 9 levels in this list, lets try them all.
for (int i = 0; i < 9; i++)
{
    builder.ListFormat.ListLevelNumber = i;
    builder.Writeln("Level " + i);
}
// Create a bulleted list based on one of the Microsoft Word list templates
// and apply it to the current paragraph in the document builder.
builder.ListFormat.List = doc.Lists.Add(ListTemplate.BulletDiamonds);
// There are 9 levels in this list, lets try them all.
for (int i = 0; i < 9; i++)
{
    builder.ListFormat.ListLevelNumber = i;
    builder.Writeln("Level " + i);
}
// This is a way to stop list formatting. 
builder.ListFormat.List = null;
builder.Document.Save(MyDir + "Lists.SpecifyListLevel Out.doc");
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Create a list based on a template.
Aspose.Words.Lists.List list1 = doc.Lists.Add(ListTemplate.NumberArabicParenthesis);
// Modify the formatting of the list.
list1.ListLevels[0].Font.Color = Color.Red;
list1.ListLevels[0].Alignment = ListLevelAlignment.Right;
builder.Writeln("List 1 starts below:");
// Use the first list in the document for a while.
builder.ListFormat.List = list1;
builder.Writeln("Item 1");
builder.Writeln("Item 2");
builder.ListFormat.RemoveNumbers();
// Now I want to reuse the first list, but need to restart numbering.
// This should be done by creating a copy of the original list formatting.
Aspose.Words.Lists.List list2 = doc.Lists.AddCopy(list1);
// We can modify the new list in any way. Including setting new start number.
list2.ListLevels[0].StartAt = 10;
// Use the second list in the document.
builder.Writeln("List 2 starts below:");
builder.ListFormat.List = list2;
builder.Writeln("Item 1");
builder.Writeln("Item 2");
builder.ListFormat.RemoveNumbers();
builder.Document.Save(MyDir + "Lists.RestartNumberingUsingListCopy Out.doc");

Following example shows how to create and use a paragraph style with list formatting.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Create a paragraph style and specify some formatting for it.
Style style = doc.Styles.Add(StyleType.Paragraph, "MyStyle1");
style.Font.Size = 24;
style.Font.Name = "Verdana";
style.ParagraphFormat.SpaceAfter = 12;
// Create a list and make sure the paragraphs that use this style will use this list.
style.ListFormat.List = doc.Lists.Add(ListTemplate.BulletDefault);
style.ListFormat.ListLevelNumber = 0;
// Apply the paragraph style to the current paragraph in the document and add some text.
builder.ParagraphFormat.Style = style;
builder.Writeln("Hello World: MyStyle1, bulleted.");
// Change to a paragraph style that has no list formatting.
builder.ParagraphFormat.Style = doc.Styles["Normal"];
builder.Writeln("Hello World: Normal.");
builder.Document.Save(MyDir + "Lists.ParagraphStyleBulleted Out.doc");