Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Using JavaScript to move paragraphs to anchored objects #14347288
    Nikki Jam
    Participant

    Here’s the problem. If there are just a few such paragraphs, the script works instantly and I get exactly what I want. But on a long document with, say, forty such paragraphs to be processed, InDesign stops responding and I have to force quit.

    I have tried to troubleshoot the problem in the following ways:
    1. Don’t use anchored text objects. Instead, place the text frame using geometric bounds derived from the paragraph line. This works instantly every time, but the result is a bit less useful.
    2. Remove various elements from the script. It’s clearly the part where the anchored text frames get populated with text that is too much for my computer.
    3. Run the script with the document closed. This still makes InDesign unresponsive.
    4. Limit the loop so that it stops after creating and populating a couple of text frames. This works, confirming that it’s the length of the document that is causing the problem.
    5. It’s possible to write the script working through the document forwards (updating the paragraph count depending on whether a paragraph has been removed or not), but it makes no difference.
    6. A completely different approach, finding each paragraph with GREP and then putting each found text object into a new text frame. But character styles are not preserved.

    Maybe I need to find a new approach that isolates the paragraphs in Word and places the text from there? But I’m wondering if there is something new I could learn about that would work more efficiently.

    —Yes all these happens. thanks https://opautoclick.com

Viewing 1 post (of 1 total)