Extracting text from multiple unthreaded text frames

Learn / Forums / General InDesign Topics / Extracting text from multiple unthreaded text frames

Viewing 10 reply threads
  • Author
    Posts
    • #70841

      Hi fellow InDesign users,

      I’m working on a 140 page document that contains text frames on pretty much every page, some of which are threaded but most aren’t, and I’ve been trying to work out a way of copying ALL the text from my original document into a new document without having to go back and forth, copying and pasting between the two (which would be a lot of work!).

      All the text in the original document is styled, and ultimately I want a new document in which all the text frames are threaded from start to finish, containing the styled text from the original document. The styles are the important factor as I don’t want to lose them in the process.

      I’m hoping there’s an easy solution and someone can save me a lot of time, and possibly a bad case of RSI :)

      Thanks

      P.S. I’m a long-time listener of the podcast and love what you guys do. Keep up the great work!

    • #70842
      Tom Venetia
      Member

      Hello Peter,
      I am not sure I got your problem correctly.
      Nevertheless, if you wish to thread text boxes in a certain sequence that is perfectly possible. Once you have done that and all text boxes are threaded according to the order you wish, then you have created one single text document (even if they reside in different boxes) and then you can export that text.
      Interested? I can guide you through this process.
      Tom

    • #70843

      Thanks Tom. How would I do that?

    • #70844
      Tom Venetia
      Member

      Pete,
      There is a javascript that unthreads all text boxes. You will find it in Applications > Samples > Javascript. It is named “SplitStory.jpx”

      Run it and it will unthread all existing boxes that are threaded.

      I am now assuming that each box had a separate text and you wish to thread the texts in a given order.
      All you have to do is to start with the first box, click on the small rectangle down at the right corner of the text containing frame. The cursor will change showing a small peace of text. Now click (anywhere) on the second box that you wish to thread after the first. At this point the two texts will integrate as one string, even if they sit inside two different boxes (text frames).
      You will repeat this operation with all boxes, threading box 2 with the one that comes next and so on. It does not even matters if the boxes are placed on different pages, this process allows you to establish a flow of text. Once you have finished this you will have a text that contains all previous texts, in the order that you threaded the boxes. In other words, in a continuum that you wish it to be.

      An example, so that you understand what I am saying:

      Initial situation of 5 boxes after all have been unthreaded:
      Content of box 1: “Hello people, good”
      Content of box 2: “wonderful springtime day”
      Content of box 3: “who love butterflies and”
      Content of box 4: “day for those”
      Content of box 5: “flowers on this”

      Now thread the boxes in this sequence: box 1 with box 4, then 4 with 3, then 3 with 5 and finally 5 with 2.

      Click “Cntrl Y” to access the text editor and you will see that now you have a unified text that reads:
      “Hello people, good day for those who love butterflies and flowers on this wonderful springtime day”

      Enjoy
      Tom

    • #70845

      I’ve had success of just clicking the port to link and clicking the middle of the unlinked text frame. If you try to link from port to port it doesn’t work. Just click the outport and then click the middle of the next text frame you want linked.

      Am not sure if you can use option + link or the shift key to speed things up as I don’t think I’ve tried that.

      I also believe there is a script for it, and that it came with InDesign. You can look in your script folder.

      Then once it’s all linked, do “select all” and copy and paste to the new document.

      Just out of curiosity–is there a reason why you want to copy and paste everything to a new document? Is the trim size different or something?

      EDIT: Tom got here first :)

    • #70846

      @Tom: Thanks Tom, I clicked on the out port of the first frame and then on the middle of the second frame, but the first paragraph of text from the second frame adopted the styling of the text in the first frame.

      So, my first frame contains a heading, styled with ‘Heading 1’. The frame I want to link to contains body text, styled ‘Body’. When I clicked on the out port of the first frame and then on the second frame, the frames did link but the first paragraph of my ‘Body’ text adopted the ‘Heading 1’ style. Any suggestions?


      @Dwayne
      : The reason I want to move to a new document is because essentially I want a document with the same text styled in the same way, but with only one text frame on each page, as opposed to multiple text frames on each page, which is how the original document is setup. I figured if I could somehow select all the text, I could create a new document, with one text frame on my master page, so when I paste the text into the text frame on page 1 of my new document, it will automatically create as many pages as necessary. Make sense?

      • #70851

        Do all the headings and paragraphs have a hard return after them? If there is no hard return, then the following paragraph or element will take on the previous characteristic. I know I’ve seen a lot of files where there are separate un-linked text boxes, and they don’t have hard returns after the type inside them. I have to physically add a hard return and then link the boxes.

        Oh, and your explanation makes perfect sense.

    • #70854
      Tom Venetia
      Member

      Pete, Dwayne is right, I forgot this little detail. As a matter of fact I simply assumed that each text frame contained an independent snippet of formatted text.
      In other words, the frame to be linked to the next does not have a paragraph with a hard return then the next paragraph in the box that will be linked will inherit the previous paragraph’s style.
      If this is the case, to speed up the process you could use a find/change trick to insert hard returns after each paragraph, no matter if they have it or not. Of course, after this, several paragraphs may end up having an extra hard return, so once you have joined all the text frames into one single text string then you will have to remove those extra hard returns by find/changing double hard returns by only one. In this manner you will have a clean text that maintains untouched all paragraph styles.
      Using metachars this is a quite simple and quick way to accomplish such cleaning.
      Cheers
      Tom

    • #70856

      May I suggest TextStitch from Rorohiko. Just read carefully the instructions: https://www.rorohiko.com/wordpress/indesign-downloads/textstitch/

    • #70865

      @Tom: I’m going to give that a go. Still a fair bit of work to link all those frames one by one, but I’m kind of resigned to that : )

      Thanks for all the help everyone.

    • #70926
      Brent Hautle
      Member

      Hi Peter,

      This is just an idea, but what if you exported the doc as a tagged PDF. You might then be able to select all the text in the document and copy/paste. There’s a few things to keep in mind when doing it: make sure in your PDF settings under “marks and bleeds” you have everything turned off (or else you’re document info will also be selected for each page).

      Please let us know if this works.

    • #70927
      David Blatner
      Keymaster
Viewing 10 reply threads
  • You must be logged in to reply to this topic.
>