I have a Word document with three levels of headlines. They are formatted properly with the Headline 1-3 styles and are also automatically numbered as e.g.
1. first level,
2.3 second level or
4.5.6 third level.
Now in my document header I used a STYLEREF field to automatically add the current first level chapter to each page, which works fine.
However, I would also like to do the same for second level headlines, but only if there is a second level headline. In other words, it should not appear on pages that have only content belonging directly to a first level headline. In that case it currently goes on searching on the following pages until it finally finds the next second level headline and shows that one, ignoring that this part hasn't started on the current page yet.
How can I display the second level headline text in the header, but only if the page contains second level content?