Imports Docs.Word



Public Class Paragraphs_CreateList
	Friend Shared Function Main1() As Document
		'	Create a new document and get NodeList of first section
		Dim Doc As Document = Document.CreateNew()
		Dim Nodes As NodeList = Doc.Sections(0).Nodes

		'	Create a paragraph and make it a first paragraph of new list
		Dim Par1 As New Paragraph("Paragraph 1")
        Par1.CreateList(ListStyleEnum.NumberedList, Nodes, -1)

		'	Create a few more paragraphs and insert them in this list
		Dim Par2 As New Paragraph("Paragraph 2")
        Par2.InsertInList(Nodes, 0, 0)
		Dim Par3 As New Paragraph("Paragraph 3")
        Par3.InsertInList(Nodes, 1, 1)
		Dim Par4 As New Paragraph("Paragraph 4")
        Par4.InsertInList(Nodes, 2, 0)

		Nodes.AddParagraph(vbCr)

		'	Create 2nd list and insert several paragraphs into it
		Dim Par5 As New Paragraph("Paragraph 5")
        Par5.CreateList(ListStyleEnum.BulletedList, Nodes, 4)
		Dim Par6 As New Paragraph("Paragraph 6")
        Par6.InsertInList(Nodes, 5, 0)
		Dim Par7 As New Paragraph("Paragraph 7")
        Par7.InsertInList(Nodes, 6, 1)
		Dim Par8 As New Paragraph("Paragraph 8")
        Par8.InsertInList(Nodes, 7, 0)

		Return Doc
	End Function
End Class
