How to create Multilevel Numbered Headings in word document by using DocumentFormat.OpenXml.Wordprocessing in C#

49 views Asked by At

I would like to create word document by using C# and library named "DocumentFormat.OpenXml.Wordprocessing". However, I have a problem about numbering and creating multilevel headings.

The target result is like the following example.

Example :

  1. Chapter 1

    1.1. Chapter 1.1.

    1.2. Chapter 1.2.

  2. Chapter 2

    2.1. Chapter 2.1.

But the result that I have is like this :

  1. Chapter 1

    1. Chapter 1.1.

    2. Chapter 1.2.

  2. Chapter 2

    1. Chapter 2.1.

I used NumberingLevelReference() to adjust heading number but the result is not right.

Please suggest parameter or something that I need to add. Thanks for your help and I apologize for my english.

0

There are 0 answers