ä½ å¯ä»¥ç¨Spire.Doc.dllæ¥åï¼ä¸é¢æ¯åçä¸ä¸ªdemoï¼ä½ åèä¸ä¸
using Spire.Doc;
using Spire.Doc.Documents;
namespace WordBullets
{
class Program
{
static void Main(string[] args)
{
//å建ä¸ä¸ªDocument类对象ï¼å¹¶å è½½Wordææ¡£
Document doc = new Document();
doc.LoadFromFile(@"C:\Users\Administrator\Desktop\Test.docx");
//éåææ¡£ä¸çææ段è½ï¼æ·»å 项ç®æ å·
Section s = doc.Sections[0];
for (int i = 0; i < s.Paragraphs.Count; i++)
{
Paragraph p = s.Paragraphs[i];
p.ListFormat.ApplyBulletStyle();
p.ListFormat.CurrentListLevel.NumberPosition = -10;
}
//ä¿å并æå¼ææ¡£
doc.SaveToFile("sample.docx", FileFormat.Docx);
System.Diagnostics.Process.Start("sample.docx");
}
}
}
å®æ代ç ï¼è°è¯è¿è¡é¡¹ç®åï¼å°±å¯ä»¥çå°æä½ç»æäºï¼å¦ä¸ï¼