Asked • 06/21/19

inDesign Script: Get Text and Page number of Text styled with a certain Paragraph Style using JavaScript?

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!

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.