3 Replies Latest reply on Sep 22, 2011 9:15 AM by InDesigner of the North

    Placing text without using cursor

    InDesigner of the North

      This is kind of a continuation of my last question

       

      Anyways I want to import a word document into an InDesign template that has two columns...

      one eng, one fra...as I've discovered the only files that can be imported are xml.

       

      So I used the place function to do this and it works.

       

      My script is very simple and works like this:

       

      you execute the script and a dialog box pops up, the user browses for the eng word document and double clicks on it.

      Then you wait a few seconds for it to gather it, when that's done, you will see a thumbnail like image on your cursor.

      You simply go to the left column of the inDesign template and click and the column is poulated with the eng word doc.

       

      Then you go through the same steps to put the fra word in the right column. The only thing you have to do

      differently is you need to hold down the shift key before you click into the right column.

       

       

      So here's my dilema I want to add to my script the abiliy to bypass all that stuff...just make the user browse for the document,

      click and bam it's in the left column, do it again, bam in the right. done.

       

      here's my code:

       

       

      var newDoc = app.activeDocument;

      newDoc = app.activeDocument.place(File.openDialog ());

        • 1. Re: Placing text without using cursor
          John Hawkinson Level 5

          Good morning, IDotN:

           

          I'm sorry, I can't see a question in your post. Can you please explain what you want to do a lot more clearly? And what is the precise problem you are encountering?

           

           

          Anyways I want to import a word document into an InDesign template that has two columns...

          one eng, one fra...as I've discovered the only files that can be imported are xml.

          This paragraph doesn't make sense. Did you mean to write something else?

          So here's my dilema I want to add to my script the abiliy to bypass all that stuff...just make the user browse for the document,

          click and bam it's in the left column, do it again, bam in the right. done.

          A dilemma is a choice between two alternatives. I don't see the problem here, much less the dilemma?

          • 2. Re: Placing text without using cursor
            Peter Kahrel Adobe Community Professional & MVP

            IDtoN,

             

            It's not the case that you can place just XML: you can place doc, rtf, els, pdf, etc. and whatever else.

            To have a script bypass manual placement, use your dialog to let the user select the two files, then place the eng file in the eng column by using something like this:

             

            myTextFrame.columns[0].insertionPoints[0].place(myFile);

             

            Then place the fra document in the second column.

             

            Peter

            1 person found this helpful
            • 3. Re: Placing text without using cursor
              InDesigner of the North Level 1

              Thank you Peter

               

              I'll try this out