First, insert the directory.
Complete the directory level setting and switch to the reference tab. In the table of contents group, click the Customize Table of Contents button to pop up the table of contents dialog box, where you can set whether the page number is displayed, whether the page number is right-aligned, tab leading format, display level, etc.
Word tip-customize the format of the table of contents
Second, set the custom directory format.
Switch to the start tab. In the style group, click the expand button in the lower right corner to pop up the style pane. We can see the directory 1- directory 9 and a ***9 directory style, which respectively correspond to the nine levels of the outline level in the directory. Click the lower triangle button of the directory 1, and click the Modify button to open the dialog box for modifying styles, where you can set the level of 1.