4 Replies Latest reply on Oct 22, 2014 9:41 AM by Faith-Action


    Faith-Action Level 1

      Can anyone help me with a script for InDesign CC v 9.2.1 that will pull out the text in one particular paragraph style and copy to another document? [style = d-question]

        • 1. Re: script
          Chinnadk Level 4

          Try this,


          It will copy the contents those are applied "d-question" style to the second document's first text frame.


          var doc = app.activeDocument,
              paras = doc.stories.everyItem().textStyleRanges.everyItem().getElements(),
              newdoc = app.documents[1],
              txfm = newdoc.pages.item(0).textFrames.item(0);
          for (i=0; i<paras.length; i++)
              if(paras[i].appliedParagraphStyle.name == "d-question")




          • 2. Re: script
            Faith-Action Level 1

            Thank you SO much Chinna, Can you please help me just a little more? I have saved the script into my users tab on the script panel. The first time i tried to run it i got an error message which led me to know i needed to open another blank document. when i did that and ran it again i didn't get an error message but  nothing seems to happen??? any suggestions. Thanks again, Elizabeth

            • 3. Re: script
              Faith-Action Level 1

              Oh dear, never mind. So sorry. I put a dash instead of underscore when i gave you the style name :\

              • 4. Re: script
                Faith-Action Level 1

                Chinna, would you please look at what happens when i run this script. I have used it for 5 documents and tried various things. I have found page 1 of the new document [the exported questions] altho the questions are not in order, they look fine and i can straighten out the order. But the following pages do crazy things. Here is a copy of some of the questions from page 2:


                Q 49  ow do some turn the Word of God into the word of man? What results?

                 hat is the most important reason why we should pay attention to Scripture?Q 48  e should pay attention to Scripture, because it is like..Q 47 

                Q 46  ow can your personal testimony help the faith of others?

                Q 45  hat makes the word of the Prophets more certain?

                 hat does paying attention to the Scriptures prevent (2 Pet. 3:17)?Q 44 

                )11 (Figure 5.Q 43  hat are some ways biblical teaching differs from false teachings

                Q 42  hy does Peter refer to the Lord’s glory on the Mount of Transfiguration?

                (Figure 5.10, 2 Pet. 2:20)? Explain.Q 41  hich is worse, to never escape the corruption in the world, or to escape it, and then become entangled in it again

                If you can help I would really appreciate it.