国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Word控件Spire.Doc 【列表】教程:在 Word 文檔中插入列表

這篇具有很好參考價值的文章主要介紹了Word控件Spire.Doc 【列表】教程:在 Word 文檔中插入列表。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

Spire.Doc for .NET是一款專門對 Word 文檔進(jìn)行操作的 .NET 類庫。在于幫助開發(fā)人員無需安裝 Microsoft Word情況下,輕松快捷高效地創(chuàng)建、編輯、轉(zhuǎn)換和打印 Microsoft Word 文檔。擁有近10年專業(yè)開發(fā)經(jīng)驗Spire系列辦公文檔開發(fā)工具,專注于創(chuàng)建、編輯、轉(zhuǎn)換和打印Word/PDF/Excel等格式文件處理,小巧便捷。

E-iceblue?功能類庫Spire 系列文檔處理組件均由中國本土團隊研發(fā),不依賴第三方軟件,不受其他國家的技術(shù)或法律法規(guī)限制,同時適配國產(chǎn)操作系統(tǒng)如中科方德、中標(biāo)麒麟等,兼容國產(chǎn)文檔處理軟件 WPS(如 .wps/.et/.dps 等格式

Spire.Doc for.NET 最新下載(qun:767755948)https://www.evget.com/product/3368/download

Word 文檔中使用列表來勾勒、排列和強調(diào)文本,使用戶能夠輕松掃描和理解一系列項目。Word中有三種不同類型的列表,即編號列表,項目符號列表和多級列表。編號列表用于具有序列或優(yōu)先級的項目,例如一系列說明。項目符號列表用于沒有特定優(yōu)先級的項目,例如函數(shù)或事實列表。多級列表用于存在序列且您希望每個段落單獨編號的情況。

在 C# 中插入 Word 中的編號列表

Spire.Doc for .NET 提供了?ListStyle?類,可用于創(chuàng)建編號列表樣式或項目符號樣式。然后,可以使用?Paragraph.ListFormat.ApplyStyle()?方法將列表樣式應(yīng)用于段落。創(chuàng)建編號列表的步驟如下。

  • 創(chuàng)建文檔對象。
  • 使用?Document.AddSection()?方法添加一個節(jié)。
  • 創(chuàng)建?ListStyle?類的實例,將列表類型指定為“已編號”。
  • 通過?ListStyle.Levels[index]?屬性獲取列表的特定級別,并通過?ListLevel.PatternType?屬性設(shè)置編號類型。
  • 使用?Document.ListStyles.Add()?方法將列表樣式添加到文檔中。
  • 使用?Section.AddParagraph()?方法向文檔添加多個段落。
  • 使用?Paragraph.ListFormat.ApplyStyle()?方法將列表樣式應(yīng)用于特定段落。
  • 通過?Paragraph.ListFormat.ListLevelNumber?屬性指定列表級別。
  • 使用?Document.SaveToFile()?方法將文檔保存到 Word 文件。

【C# 】

using Spire.Doc;
using Spire.Doc.Documents;

namespace CreateOrderedList
{
class Program
{
static void Main(string[] args)
{
//Create a Document object
Document document = new Document();

//Add a section
Section section = document.AddSection();

//Create a numbered list style
ListStyle listStyle = new ListStyle(document, ListType.Numbered);
listStyle.Name = "numberedList";
listStyle.Levels[0].PatternType = ListPatternType.DecimalEnclosedParen;
listStyle.Levels[0].TextPosition = 20;
document.ListStyles.Add(listStyle);

//Add a paragraph
Paragraph paragraph = section.AddParagraph();
paragraph.AppendText("Required Web Development Skills:");
paragraph.Format.AfterSpacing = 5f;

//Add a paragraph and apply the numbered list style to it
paragraph = section.AddParagraph();
paragraph.AppendText("HTML");
paragraph.ListFormat.ApplyStyle("numberedList");
paragraph.ListFormat.ListLevelNumber = 0;

//Add another four paragraphs and apply the numbered list style to them
paragraph = section.AddParagraph();
paragraph.AppendText("CSS");
paragraph.ListFormat.ApplyStyle("numberedList");
paragraph.ListFormat.ListLevelNumber = 0;

paragraph = section.AddParagraph();
paragraph.AppendText("JavaScript");
paragraph.ListFormat.ApplyStyle("numberedList");
paragraph.ListFormat.ListLevelNumber = 0;

paragraph = section.AddParagraph();
paragraph.AppendText("Python");
paragraph.ListFormat.ApplyStyle("numberedList");
paragraph.ListFormat.ListLevelNumber = 0;

paragraph = section.AddParagraph();
paragraph.AppendText("MySQL");
paragraph.ListFormat.ApplyStyle("numberedList");
paragraph.ListFormat.ListLevelNumber = 0;

//Save the document to file
document.SaveToFile("NumberedList.docx", FileFormat.Docx);
}
}
}

【VB.NET】

Imports Spire.Doc
Imports Spire.Doc.Documents
 
Namespace CreateOrderedList
    Class Program
        Shared  Sub Main(ByVal args() As String)
            'Create a Document object
            Dim document As Document =  New Document() 
 
            'Add a section
            Dim section As Section =  document.AddSection() 
 
            'Create a numbered list style
            Dim listStyle As ListStyle =  New ListStyle(document,ListType.Numbered) 
            listStyle.Name = "numberedList"
            listStyle.Levels(0).PatternType = ListPatternType.DecimalEnclosedParen
            listStyle.Levels(0).TextPosition = 20   
            document.ListStyles.Add(listStyle)
 
            'Add a paragraph
            Dim paragraph As Paragraph =  section.AddParagraph() 
            paragraph.AppendText("Required Web Development Skills:")
            paragraph.Format.AfterSpacing = 5f
 
            'Add a paragraph and apply the numbered list style to it
            paragraph = section.AddParagraph()
            paragraph.AppendText("HTML")
            paragraph.ListFormat.ApplyStyle("numberedList")
            paragraph.ListFormat.ListLevelNumber = 0
 
            'Add another four paragraphs and apply the numbered list style to them
            paragraph = section.AddParagraph()
            paragraph.AppendText("CSS")
            paragraph.ListFormat.ApplyStyle("numberedList")
            paragraph.ListFormat.ListLevelNumber = 0
 
            paragraph = section.AddParagraph()
            paragraph.AppendText("JavaScript")
            paragraph.ListFormat.ApplyStyle("numberedList")
            paragraph.ListFormat.ListLevelNumber = 0
 
            paragraph = section.AddParagraph()
            paragraph.AppendText("Python")
            paragraph.ListFormat.ApplyStyle("numberedList")
            paragraph.ListFormat.ListLevelNumber = 0
 
            paragraph = section.AddParagraph()
            paragraph.AppendText("MySQL")
            paragraph.ListFormat.ApplyStyle("numberedList")
            paragraph.ListFormat.ListLevelNumber = 0
 
            'Save the document to file
            document.SaveToFile("NumberedList.docx", FileFormat.Docx)
        End Sub
    End Class
End Namespace

Word控件Spire.Doc 【列表】教程:在 Word 文檔中插入列表

在 C# 中插入 Word 中的項目符號列表

創(chuàng)建項目符號列表的過程類似于創(chuàng)建編號列表的過程。不同之處在于,在創(chuàng)建列表樣式時,必須將列表類型指定為"項目符號",并為其設(shè)置項目符號。以下是詳細(xì)步驟。

  • 創(chuàng)建文檔對象。
  • 使用?Document.AddSection()?方法添加一個節(jié)。
  • 創(chuàng)建?ListStyle?類的實例,將列表類型指定為項目符號
  • 通過?ListStyle.Levels[index]?屬性獲取列表的特定級別,并通過?ListLevel.BulletCharacter?屬性設(shè)置項目符號。
  • 使用?Document.ListStyles.Add()?方法將列表樣式添加到文檔中。
  • 使用?Section.AddParagraph()?方法向文檔添加多個段落。
  • 使用?Paragraph.ListFormat.ApplyStyle()?方法將列表樣式應(yīng)用于特定段落。
  • 通過?Paragraph.ListFormat.ListLevelNumber?屬性指定列表級別。
  • 使用?Document.SaveToFile()?方法將文檔保存到 Word 文件。

【C# 】

using Spire.Doc;
using Spire.Doc.Documents;

namespace CreateUnorderedList
{
class Program
{
static void Main(string[] args)
{
//Create a Document object
Document document = new Document();

//Add a section
Section section = document.AddSection();

//Create a bulleted list style
ListStyle listStyle = new ListStyle(document, ListType.Bulleted);
listStyle.Name = "bulletedList";
listStyle.Levels[0].BulletCharacter = "\x00B7";
listStyle.Levels[0].CharacterFormat.FontName = "Symbol";
listStyle.Levels[0].TextPosition = 20;
document.ListStyles.Add(listStyle);

//Add a paragraph
Paragraph paragraph = section.AddParagraph();
paragraph.AppendText("Computer Science Subjects:");
paragraph.Format.AfterSpacing = 5f;

//Add a paragraph and apply the bulleted list style to it
paragraph = section.AddParagraph();
paragraph.AppendText("Data Structure");
paragraph.ListFormat.ApplyStyle("bulletedList");
paragraph.ListFormat.ListLevelNumber = 0;

//Add another five paragraphs and apply the bulleted list style to them
paragraph = section.AddParagraph();
paragraph.AppendText("Algorithm");
paragraph.ListFormat.ApplyStyle("bulletedList");
paragraph.ListFormat.ListLevelNumber = 0;

paragraph = section.AddParagraph();
paragraph.AppendText("Computer Networks");
paragraph.ListFormat.ApplyStyle("bulletedList");
paragraph.ListFormat.ListLevelNumber = 0;

paragraph = section.AddParagraph();
paragraph.AppendText("Operating System");
paragraph.ListFormat.ApplyStyle("bulletedList");
paragraph.ListFormat.ListLevelNumber = 0;

paragraph = section.AddParagraph();
paragraph.AppendText("C Programming");
paragraph.ListFormat.ApplyStyle("bulletedList");
paragraph.ListFormat.ListLevelNumber = 0;

paragraph = section.AddParagraph();
paragraph.AppendText("Theory of Computations");
paragraph.ListFormat.ApplyStyle("bulletedList");
paragraph.ListFormat.ListLevelNumber = 0;

//Save the document to file
document.SaveToFile("BulletedList.docx", FileFormat.Docx);
}
}
}

【VB.NET】

Imports Spire.Doc
Imports Spire.Doc.Documents

Namespace CreateUnorderedList
Class Program
Shared Sub Main(ByVal args() As String)
'Create a Document object
Dim document As Document = New Document()

'Add a section
Dim section As Section = document.AddSection()

'Create a bulleted list style
Dim listStyle As ListStyle = New ListStyle(document,ListType.Bulleted)
listStyle.Name = "bulletedList"
listStyle.Levels(0).BulletCharacter = "\x00B7"
listStyle.Levels(0).CharacterFormat.FontName = "Symbol"
listStyle.Levels(0).TextPosition = 20
document.ListStyles.Add(listStyle)

'Add a paragraph
Dim paragraph As Paragraph = section.AddParagraph()
paragraph.AppendText("Computer Science Subjects:")
paragraph.Format.AfterSpacing = 5f

'Add a paragraph and apply the bulleted list style to it
paragraph = section.AddParagraph()
paragraph.AppendText("Data Structure")
paragraph.ListFormat.ApplyStyle("bulletedList")
paragraph.ListFormat.ListLevelNumber = 0

'Add another five paragraphs and apply the bulleted list style to them
paragraph = section.AddParagraph()
paragraph.AppendText("Algorithm")
paragraph.ListFormat.ApplyStyle("bulletedList")
paragraph.ListFormat.ListLevelNumber = 0

paragraph = section.AddParagraph()
paragraph.AppendText("Computer Networks")
paragraph.ListFormat.ApplyStyle("bulletedList")
paragraph.ListFormat.ListLevelNumber = 0

paragraph = section.AddParagraph()
paragraph.AppendText("Operating System")
paragraph.ListFormat.ApplyStyle("bulletedList")
paragraph.ListFormat.ListLevelNumber = 0

paragraph = section.AddParagraph()
paragraph.AppendText("C Programming")
paragraph.ListFormat.ApplyStyle("bulletedList")
paragraph.ListFormat.ListLevelNumber = 0

paragraph = section.AddParagraph()
paragraph.AppendText("Theory of Computations")
paragraph.ListFormat.ApplyStyle("bulletedList")
paragraph.ListFormat.ListLevelNumber = 0

'Save the document to file
document.SaveToFile("BulletedList.docx", FileFormat.Docx)
End Sub
End Class
End Namespace

Word控件Spire.Doc 【列表】教程:在 Word 文檔中插入列表

在 C# 的 Word 中插入多級編號列表

多級列表至少包含兩個不同的級別。嵌套列表的每個級別都由?ListStyle.Levels[index]?屬性表示,通過該屬性可以設(shè)置特定級別的編號類型和前綴。以下是在 Word 中創(chuàng)建多級編號列表的步驟。

  • 創(chuàng)建文檔對象。
  • 使用?Document.AddSection()?方法添加一個節(jié)。
  • 創(chuàng)建?ListStyle?類的實例,將列表類型指定為“已編號”。
  • 通過?ListStyle.Levels[index]?屬性獲取列表的特定級別,并設(shè)置編號類型和前綴。
  • 使用?Document.ListStyles.Add()?方法將列表樣式添加到文檔中。
  • 使用?Section.AddParagraph()?方法向文檔添加多個段落。
  • 使用?Paragraph.ListFormat.ApplyStyle()?方法將列表樣式應(yīng)用于特定段落。
  • 通過?Paragraph.ListFormat.ListLevelNumber?屬性指定列表級別。
  • 使用?Document.SaveToFile()?方法將文檔保存到 Word 文件。

【C# 】

using Spire.Doc;
using Spire.Doc.Documents;

namespace CreateMultiLevelList
{
class Program
{
static void Main(string[] args)
{
//Create a Document object
Document document = new Document();

//Add a section
Section section = document.AddSection();

//Create a numbered list style, specifying number prefix and pattern type of each level
ListStyle listStyle = new ListStyle(document, ListType.Numbered);
listStyle.Name = "levelstyle";
listStyle.Levels[0].PatternType = ListPatternType.Arabic;
listStyle.Levels[0].TextPosition = 20;
listStyle.Levels[1].NumberPrefix = "\x0000.";
listStyle.Levels[1].PatternType = ListPatternType.Arabic;
listStyle.Levels[2].NumberPrefix = "\x0000.\x0001.";
listStyle.Levels[2].PatternType = ListPatternType.Arabic;
document.ListStyles.Add(listStyle);

//Add a paragraph
Paragraph paragraph = section.AddParagraph();
paragraph.AppendText("Here's a Multi-Level Numbered List:");
paragraph.Format.AfterSpacing = 5f;

//Add a paragraph and apply the numbered list style to it
paragraph = section.AddParagraph();
paragraph.AppendText("The first item");
paragraph.ListFormat.ApplyStyle("levelstyle");
paragraph.ListFormat.ListLevelNumber = 0;

//Add another five paragraphs and apply the numbered list stype to them
paragraph = section.AddParagraph();
paragraph.AppendText("The second item");
paragraph.ListFormat.ApplyStyle("levelstyle");
paragraph.ListFormat.ListLevelNumber = 0;

paragraph = section.AddParagraph();
paragraph.AppendText("The first sub-item");
paragraph.ListFormat.ApplyStyle("levelstyle");
paragraph.ListFormat.ListLevelNumber = 1;

paragraph = section.AddParagraph();
paragraph.AppendText("The second sub-item");
paragraph.ListFormat.ContinueListNumbering();
paragraph.ListFormat.ApplyStyle("levelstyle");

paragraph = section.AddParagraph();
paragraph.AppendText("A sub-sub-item");
paragraph.ListFormat.ApplyStyle("levelstyle");
paragraph.ListFormat.ListLevelNumber = 2;

paragraph = section.AddParagraph();
paragraph.AppendText("The third item");
paragraph.ListFormat.ApplyStyle("levelstyle");
paragraph.ListFormat.ListLevelNumber = 0;

//Save the document to file
document.SaveToFile("MultilevelNumberedList.docx", FileFormat.Docx);
}
}
}

【VB.NET】

Imports Spire.Doc
Imports Spire.Doc.Documents

Namespace CreateMultiLevelList
Class Program
Shared Sub Main(ByVal args() As String)
'Create a Document object
Dim document As Document = New Document()

'Add a section
Dim section As Section = document.AddSection()

'Create a numbered list style, specifying number prefix and pattern type of each level
Dim listStyle As ListStyle = New ListStyle(document,ListType.Numbered)
listStyle.Name = "levelstyle"
listStyle.Levels(0).PatternType = ListPatternType.Arabic
listStyle.Levels(0).TextPosition = 20
listStyle.Levels(1).NumberPrefix = "\x0000."
listStyle.Levels(1).PatternType = ListPatternType.Arabic
listStyle.Levels(2).NumberPrefix = "\x0000.\x0001."
listStyle.Levels(2).PatternType = ListPatternType.Arabic
document.ListStyles.Add(listStyle)

'Add a paragraph
Dim paragraph As Paragraph = section.AddParagraph()
paragraph.AppendText("Here's a Multi-Level Numbered List:")
paragraph.Format.AfterSpacing = 5f

'Add a paragraph and apply the numbered list style to it
paragraph = section.AddParagraph()
paragraph.AppendText("The first item")
paragraph.ListFormat.ApplyStyle("levelstyle")
paragraph.ListFormat.ListLevelNumber = 0

'Add another five paragraphs and apply the numbered list stype to them
paragraph = section.AddParagraph()
paragraph.AppendText("The second item")
paragraph.ListFormat.ApplyStyle("levelstyle")
paragraph.ListFormat.ListLevelNumber = 0

paragraph = section.AddParagraph()
paragraph.AppendText("The first sub-item")
paragraph.ListFormat.ApplyStyle("levelstyle")
paragraph.ListFormat.ListLevelNumber = 1

paragraph = section.AddParagraph()
paragraph.AppendText("The second sub-item")
paragraph.ListFormat.ContinueListNumbering()
paragraph.ListFormat.ApplyStyle("levelstyle")

paragraph = section.AddParagraph()
paragraph.AppendText("A sub-sub-item")
paragraph.ListFormat.ApplyStyle("levelstyle")
paragraph.ListFormat.ListLevelNumber = 2

paragraph = section.AddParagraph()
paragraph.AppendText("The third item")
paragraph.ListFormat.ApplyStyle("levelstyle")
paragraph.ListFormat.ListLevelNumber = 0

'Save the document to file
document.SaveToFile("MultilevelNumberedList.docx", FileFormat.Docx)
End Sub
End Class
End Namespace

Word控件Spire.Doc 【列表】教程:在 Word 文檔中插入列表

在 C# 的 Word 中插入多級混合類型列表

在某些情況下,您可能希望在多級列表中混合使用數(shù)字和符號項目符號點。要創(chuàng)建混合類型列表,您只需創(chuàng)建編號列表樣式和項目符號列表樣式,并將它們應(yīng)用于不同的段落。具體步驟如下。

  • 創(chuàng)建文檔對象。
  • 使用?Document.AddSection()?方法添加一個節(jié)。
  • 創(chuàng)建編號列表樣式和項目符號列表樣式。
  • 使用?Section.AddParagraph()?方法向文檔添加多個段落。
  • 使用?Paragraph.ListFormat.ApplyStyle()?方法將不同的列表樣式應(yīng)用于不同的段落。
  • 使用?Document.SaveToFile()?方法將文檔保存到 Word 文件。

【C# 】

using Spire.Doc;
using Spire.Doc.Documents;

namespace CreateMultilevelMixedList
{
class Program
{
static void Main(string[] args)
{
//Create a Document object
Document document = new Document();

//Add a section
Section section = document.AddSection();

//Create a numbered list style
ListStyle numberedListStyle = new ListStyle(document, ListType.Numbered);
numberedListStyle.Name = "numberedStyle";
numberedListStyle.Levels[0].PatternType = ListPatternType.Arabic;
numberedListStyle.Levels[0].TextPosition = 20;
numberedListStyle.Levels[1].PatternType = ListPatternType.LowLetter;
document.ListStyles.Add(numberedListStyle);

//Create a bulleted list style
ListStyle bulletedListStyle = new ListStyle(document, ListType.Bulleted);
bulletedListStyle.Name = "bulltedStyle";
bulletedListStyle.Levels[2].BulletCharacter = "\x002A";
bulletedListStyle.Levels[2].CharacterFormat.FontName = "Symbol";
document.ListStyles.Add(bulletedListStyle);

//Add a paragraph
Paragraph paragraph = section.AddParagraph();
paragraph.AppendText("Here's a Multi-Level Mixed List:");
paragraph.Format.AfterSpacing = 5f;

//Add a paragraph and apply the numbered list style to it
paragraph = section.AddParagraph();
paragraph.AppendText("The first item");
paragraph.ListFormat.ApplyStyle("numberedStyle");
paragraph.ListFormat.ListLevelNumber = 0;

//Add another five paragraphs and apply different list stype to them
paragraph = section.AddParagraph();
paragraph.AppendText("The first sub-item");
paragraph.ListFormat.ApplyStyle("numberedStyle");
paragraph.ListFormat.ListLevelNumber = 1;

paragraph = section.AddParagraph();
paragraph.AppendText("The second sub-item");
paragraph.ListFormat.ListLevelNumber = 1;
paragraph.ListFormat.ApplyStyle("numberedStyle");

paragraph = section.AddParagraph();
paragraph.AppendText("The first sub-sub-item");
paragraph.ListFormat.ApplyStyle("bulltedStyle");
paragraph.ListFormat.ListLevelNumber = 2;

paragraph = section.AddParagraph();
paragraph.AppendText("The second sub-sub-item");
paragraph.ListFormat.ApplyStyle("bulltedStyle");
paragraph.ListFormat.ListLevelNumber = 2;

paragraph = section.AddParagraph();
paragraph.AppendText("The second item");
paragraph.ListFormat.ApplyStyle("numberedStyle");
paragraph.ListFormat.ListLevelNumber = 0;

//Save the document to file
document.SaveToFile("MultilevelMixedList.docx", FileFormat.Docx);
}
}
}

【VB.NET】

Imports Spire.Doc
Imports Spire.Doc.Documents

Namespace CreateMultilevelMixedList
Class Program
Shared Sub Main(ByVal args() As String)
'Create a Document object
Dim document As Document = New Document()

'Add a section
Dim section As Section = document.AddSection()

'Create a numbered list style
Dim numberedListStyle As ListStyle = New ListStyle(document,ListType.Numbered)
numberedListStyle.Name = "numberedStyle"
numberedListStyle.Levels(0).PatternType = ListPatternType.Arabic
numberedListStyle.Levels(0).TextPosition = 20
numberedListStyle.Levels(1).PatternType = ListPatternType.LowLetter
document.ListStyles.Add(numberedListStyle)

'Create a bulleted list style
Dim bulletedListStyle As ListStyle = New ListStyle(document,ListType.Bulleted)
bulletedListStyle.Name = "bulltedStyle"
bulletedListStyle.Levels(2).BulletCharacter = "\x002A"
bulletedListStyle.Levels(2).CharacterFormat.FontName = "Symbol"
document.ListStyles.Add(bulletedListStyle)

'Add a paragraph
Dim paragraph As Paragraph = section.AddParagraph()
paragraph.AppendText("Here's a Multi-Level Mixed List:")
paragraph.Format.AfterSpacing = 5f

'Add a paragraph and apply the numbered list style to it
paragraph = section.AddParagraph()
paragraph.AppendText("The first item")
paragraph.ListFormat.ApplyStyle("numberedStyle")
paragraph.ListFormat.ListLevelNumber = 0

'Add another five paragraphs and apply different list stype to them
paragraph = section.AddParagraph()
paragraph.AppendText("The first sub-item")
paragraph.ListFormat.ApplyStyle("numberedStyle")
paragraph.ListFormat.ListLevelNumber = 1

paragraph = section.AddParagraph()
paragraph.AppendText("The second sub-item")
paragraph.ListFormat.ListLevelNumber = 1
paragraph.ListFormat.ApplyStyle("numberedStyle")

paragraph = section.AddParagraph()
paragraph.AppendText("The first sub-sub-item")
paragraph.ListFormat.ApplyStyle("bulltedStyle")
paragraph.ListFormat.ListLevelNumber = 2

paragraph = section.AddParagraph()
paragraph.AppendText("The second sub-sub-item")
paragraph.ListFormat.ApplyStyle("bulltedStyle")
paragraph.ListFormat.ListLevelNumber = 2

paragraph = section.AddParagraph()
paragraph.AppendText("The second item")
paragraph.ListFormat.ApplyStyle("numberedStyle")
paragraph.ListFormat.ListLevelNumber = 0

'Save the document to file
document.SaveToFile("MultilevelMixedList.docx", FileFormat.Docx)
End Sub
End Class
End Namespace

Word控件Spire.Doc 【列表】教程:在 Word 文檔中插入列表

以上便是如何在 Word 文檔中插入列表的教程,如果您有其他問題也可以繼續(xù)瀏覽本系列文章。文章來源地址http://www.zghlxwxcb.cn/news/detail-459783.html

到了這里,關(guān)于Word控件Spire.Doc 【列表】教程:在 Word 文檔中插入列表的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • Word控件Spire.Doc 【Table】教程(6): 在 Word 中合并或拆分表格單元格

    Word控件Spire.Doc 【Table】教程(6): 在 Word 中合并或拆分表格單元格

    Spire.Doc for .NET是一款專門對 Word 文檔進(jìn)行操作的 .NET 類庫。在于幫助開發(fā)人員無需安裝 Microsoft Word情況下,輕松快捷高效地創(chuàng)建、編輯、轉(zhuǎn)換和打印 Microsoft Word 文檔。擁有近10年專業(yè)開發(fā)經(jīng)驗Spire系列辦公文檔開發(fā)工具,專注于創(chuàng)建、編輯、轉(zhuǎn)換和打印Word/PDF/Excel等格式文件處

    2024年02月15日
    瀏覽(47)
  • Spire.doc讀取模板文檔,并在書簽處插入內(nèi)容
  • 借助文檔控件Aspose.Words,將 Word DOC/DOCX 轉(zhuǎn)換為 TXT

    借助文檔控件Aspose.Words,將 Word DOC/DOCX 轉(zhuǎn)換為 TXT

    在文檔處理領(lǐng)域,經(jīng)常需要將 Word 文檔轉(zhuǎn)換為更簡單的純文本格式。無論是出于數(shù)據(jù)提取、內(nèi)容分析還是兼容性原因,將 Word(.doc、.docx)文件轉(zhuǎn)換為純文本(.txt)的能力對于開發(fā)人員來說都是一項寶貴的技能。在這篇博文中,我們將探討如何在 C# 應(yīng)用程序中將 Word 文檔轉(zhuǎn)換

    2024年01月19日
    瀏覽(26)
  • Spire.doc實現(xiàn)對word的操作(包括文字,表格,圖片)

    Spire.doc實現(xiàn)對word的操作(包括文字,表格,圖片)

    Spire.doc比較小眾,因此需要在pom.xml中導(dǎo)入spire.doc的倉庫,導(dǎo)入之后直接導(dǎo)包 導(dǎo)入倉庫后進(jìn)行導(dǎo)包 2.1.1模板 首先需要準(zhǔn)備一個word模板,可以在里面進(jìn)行文字替換,因為文字特別多,所以此處采用了對具有特殊符號的文字進(jìn)行替換。此處采用 ${xxx} 模板如圖所示: 2.1.2替換核心

    2023年04月12日
    瀏覽(33)
  • java 將word轉(zhuǎn)為pdf文件的兩種方式【spire.doc.free】【documents4j】

    java 將word轉(zhuǎn)為pdf文件的兩種方式【spire.doc.free】【documents4j】

    如資產(chǎn)證明等場景下,一般要求同時生成word與pdf兩種格式的證明文件,且兩者格式需保持一致,可以各自單獨生成,但那樣可能需要維護(hù)兩個模板文件,所以也可以僅定義一份word的模板文件,使用模板生成word文件,再將word轉(zhuǎn)換為pdf,這樣不僅少維護(hù)一個模板,也可以保證

    2024年02月12日
    瀏覽(26)
  • Java使用spire進(jìn)行word文檔的替換

    Java使用spire進(jìn)行word文檔的替換

    今天遇到一個需求,需要對word模板進(jìn)行替換制定的變量 在網(wǎng)上找了很多方案,做了很多的demo,下面就把我覺得比較簡單的一種分享給大家 本次的主角是:spire.doc Spire.Doc for .NET 是一款專門對 Word 文檔進(jìn)行操作的 .NET類庫。這款控件的主要功能在于幫助開發(fā)人員輕松快捷高效

    2024年02月05日
    瀏覽(43)
  • PDF控件Spire.PDF for .NET【安全】演示:加密 PDF 文檔

    PDF控件Spire.PDF for .NET【安全】演示:加密 PDF 文檔

    加密PDF是人們常用的保護(hù)PDF的方法。無論對于公司還是個人,使用PDF加密來設(shè)置一些限制都是必不可少的。為了使PDF文檔可供未經(jīng)授權(quán)的用戶閱讀但無法修改,加密的PDF文檔需要兩個密碼:所有者密碼和用戶密碼。本節(jié)將特別介紹一種通過 Spire.PDF for .NET 使用 C#、VB.NET 快速加

    2024年03月14日
    瀏覽(28)
  • PDF控件Spire.PDF for .NET【安全】演示:更改 PDF 文檔的安全權(quán)限

    PDF控件Spire.PDF for .NET【安全】演示:更改 PDF 文檔的安全權(quán)限

    當(dāng)您使用密碼保護(hù) PDF 文檔時,您可以選擇指定一組權(quán)限。權(quán)限決定用戶如何與文件交互。例如,您可以對文檔應(yīng)用權(quán)限以禁止用戶打印或使用剪切和粘貼操作。本文演示如何在C# 和 VB.NET中使用Spire.PDF for .NET更改 PDF 文檔的安全權(quán)限。 Spire.PDF for .NET?是一款獨立 PDF 控件,用于

    2024年01月19日
    瀏覽(39)
  • Python 實現(xiàn) PDF 到 Word 文檔的高效轉(zhuǎn)換(DOC、DOCX)

    Python 實現(xiàn) PDF 到 Word 文檔的高效轉(zhuǎn)換(DOC、DOCX)

    PDF(Portable Document Format)已成為一種廣泛使用的電子文檔格式。PDF的主要優(yōu)勢是跨平臺,可以在不同設(shè)備上呈現(xiàn)一致的外觀。然而,當(dāng)我們需要對文件內(nèi)容進(jìn)行編輯或修改,直接編輯PDF文件會非常困難,而且效果也不理想。將PDF文件轉(zhuǎn)換為Word文檔(doc、docx)再進(jìn)行編輯是一

    2024年02月03日
    瀏覽(30)
  • Java處理doc類型的Word文檔轉(zhuǎn)換成html(按順序保留格式+圖片)

    Java處理doc類型的Word文檔轉(zhuǎn)換成html(按順序保留格式+圖片)

    最新有個新需求,就是doc文檔轉(zhuǎn)換html內(nèi)容倒不是很難,給大家分享一下,總體思路就是按doc轉(zhuǎn)html的思路來走,唯一缺點是不會自動轉(zhuǎn)換圖片,圖片是要手動轉(zhuǎn)成base64,默認(rèn)是有html、body、head、meta等等標(biāo)簽,我這里都用正則處理掉了。 需要注意的是: .docx 格式的 Word 文檔是

    2024年02月03日
    瀏覽(30)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包