How to Set Word Bullet Style in C#, VB.NET

Word Bullet can format several paragraphs as a list. It can emphasize paragraphs with bullets and attract readers’ attention. With bullets, the listed paragraphs will be indented automatically with symbols, which can be point, number or other customized symbols (such as small star, triangle, arrow etc.).

Spire.Doc for .NET, an easy-to-use component to operate Word document for developers' .NET applications, enables users to set Word bullet style for paragraphs in document. This guide will focus on how to realize this function by using C#, VB.NET via Spire.Doc for .NET.

After loading the document, get paragraphs which you want to set bullet style and then invoke p.ListFormat.ApplyBulletStyle() method to format. Also, you can set NumberPosition property of current list to get spacing between bullet symbol and paragraph contents. Download and Install Spire.Doc for .NET. And then use the following code to set Word bullet style.

Word Paragraph Bullets

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

namespace WordBullets
    class Program
        static void Main(string[] args)
            //Load Document
            Document doc = new Document();

            //Set Bullet Style
            Section s = doc.Sections[0];

            for (int i = 1; i< s.Paragraphs.Count; i++)
                Paragraph p = s.Paragraphs[i];
                p.ListFormat.CurrentListLevel.NumberPosition = -10;

            //Save and Launch
            doc.SaveToFile("sample.docx", FileFormat.Docx);
Imports Spire.Doc
Imports Spire.Doc.Documents

Namespace WordBullets
    Friend Class Program
        Shared Sub Main(ByVal args() As String)
            'Load Document
            Dim doc As New Document()

            'Set Bullet Style
            Dim s As Section = doc.Sections(0)

            For i As Integer = 1 To s.Paragraphs.Count - 1
                Dim p As Paragraph = s.Paragraphs(i)
                p.ListFormat.CurrentListLevel.NumberPosition = -10
            Next i

            'Save and Launch
            doc.SaveToFile("sample.docx", FileFormat.Docx)
        End Sub
    End Class
End Namespace

Spire.Doc is a stand-alone component, enabling developers/programmers to generate, open, write, edit and save Word document in WPF, .NET and Silverlight without Microsoft Word installed on system.