Copy link to clipboard
Copied
Is it posssible loop through all the paragraphs in InDesign and highlight the paragraphs that are repeated using InDesign Scripting?
Copy link to clipboard
Copied
Yes, this is possible!
Copy link to clipboard
Copied
how do you scan through the document to find it
Copy link to clipboard
Copied
1. Loop through all paras
2. Store the current para
3. Loop again in a inner loop through all paras and compare the content of the paras with the current para content
4. Maybe a bit finetunung:
a) Check, if the index of the compared Para != the current para
b) Create a new list, push a found and check if a found is already in the list
c) include some counters to show you, how many founds you have
Good luck.
Edit: If you try to find only preceeded ones, then there is only one loop needed, as Loic described! If you try to find multiples on different places, you may need two loops.
Copy link to clipboard
Copied
Hi,
Here is what you need to do :
1. Reference the document you want to work with
2. Reference every single paragraphs that belong to that document
3. Loop through them and see if the contents equals the preceeding one
4. Highlight it.
So now it's up to you to get at the forum (search) a/o docs to pass through the listed points. We will the n happy to provide more help.
Loic
Copy link to clipboard
Copied
The duplicate paragraph can be anywhere in the document need not be the precedng one or succeeding one