If you update your TOC before producing the PDF they will have a TOC showing what they have.
You can delete the entries for the sections not shown if you want.
How is your programming skill set?
You could write a userform to do this. It would not be a beginner project.
Create & Employ a Userform
Create a Simple Userform
A userform is a custom dialog box that runs Word for you to do certain tasks.
If you attempt this, I'm sure someone here will help you. However, do not expect someone here to write a custom application for you.
Basic idea, start with this as a
template, not a document. You will be creating documents based on the template. The creation of the new document will trigger the appearance of the userform.
You can store your sections as
AutoText in the template and have the userform do the following:
- Let you pick what you want.
- Insert it in the document from the AutoText.
- Update the TOC.
- Assign a name and save as PDF.