I have an inDesign document with 10 pages filled with text. The text is styled with different Paragraph Styles, of which some are relevant for building a custom table of contents.
There are two relevant Paragraph Styles, "Header1" and "Header2" from which I am trying to build my own Table of Contents, which I want to export in a text file.
The relevant information I need to get is the text which is styled with "Header1" and "Header2" and the corresponding page number.
I tried to achieve this via GREP and was halfway successful, but GREP scans the whole document and not page by page.
Is there a way to go through all styled texts by Paragraph Style page by page?
Thanks in advance!