1. Double-click to open the wps word document that needs to generate the table of contents automatically.
2. Select the title of the document, and then click the "Title 1" command in the word start menu.
3. Then, select the subtitles in the same way, and then click the "Heading 2" command in the start menu.
4. Next, select the subtitle in the subtitle, and then click the "Heading 3" command in the word start menu.
5. After setting all the titles, place the cursor where you want to insert the document directory.
6. Then, click the Insert menu, find and click the domain command.
7. In the pop-up domain dialog box, select Create Directory in Please Select Domain, and then click OK.
8. Click OK to check whether the title you just set has been automatically generated.