1、How to change the current footer formatting, renumber
2、How to set entire document fonts,not by run set font,that is overly complex
3、Symbol ① how to implement automatic numbering.
4、This substitution is very slow
doca.Sections[1].Body.Range.Replace(new Regex(@"([\u0020])"), "");
Hi,
Thanks for your inquiry. Here is the code to generate lists with custom formatting:
Document doc = new Document();
Style listStyle = doc.Styles.Add(StyleType.List, "MyListStyle");
Aspose.Words.Lists.List list1 = listStyle.List;
ListLevel level = list1.ListLevels[0];
level.Font.Name = "SimSun";
level.Font.Color = Color.Green;
level.NumberStyle = NumberStyle.GB3;
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln("Test Page 1");
Aspose.Words.Lists.List list2 = doc.Lists.Add(listStyle);
builder.ListFormat.List = list2;
builder.Writeln("Item 1");
builder.Writeln("Item 2");
builder.Write("Item 3");
builder.Document.Save(@"C:\Temp\out.docx");
Regarding restarting page numbering at the beginning of second Section, please set the PageSetup.RestartPageNumbering property to true.
I hope, this helps.
Best Regards,
1、I set level.NumberStyle = NumberStyle.GB3,but Automatic numbering is①.
I do not want dot,I estimated need set level.NumberFormat.I hope like the attachment file.
2、paragraph.range.text is Garbled
3、if Following settings is Success 1、2、3,I want To achieve ,how to set NumberFormat?
①
test2
②
fjai
③
there I want auto set
list1.ListLevels[0].NumberFormat = "%1 ";
list1.ListLevels[1].NumberFormat = "%1.%2 ";
list1.ListLevels[0].NumberFormat = "%1 ";
list1.ListLevels[1].NumberFormat = "%1.%2 ";
Hi,
Thanks for your inquiry. To remove the trailing dots at the end of list numbers, please use the ListLevel.NumberFormat property as follows:
level.NumberFormat = "**%1**";
Regarding the problem “paragraph.range.text is Garbled” you mentioned in second point, could you please share the complete code to reproduce the same issue on my side. You can create a simple Console Application that demonstrates this problem.
Best Regards,