2 Replies Latest reply on May 30, 2014 8:57 AM by virender_CTS

    Copy tables from one document to another in indd cs6




      I have two documents different content but same page numbers, trim size and margin etc.


      Once the main document is final, there are few tables from page 5 to page 20 (one table on each page) which exactly goes in anther document (same page and same xy co-ordinates).


      Need script for this.


      As every table is present in text frame so i can easily assign variable to that text frame.

      var myTable1 = myDoc.pageItems.itemByID(111076);  //page 5 table

      var myTable2 = myDoc.pageItems.itemByID(111080);  //page 6 table  etc.





      Note: there are other text frame on pages which have tables.

        • 1. Re: Copy tables from one document to another in indd cs6
          [Jongware] Most Valuable Participant

          This is not a forum to request "free scripts". People are likely to *assist* you at a point where you run in to problems, but a bit more effort from your own side is highly preferred.

          • 2. Re: Copy tables from one document to another in indd cs6
            virender_CTS Level 1


            yes i agree i should put some effort from my side but I have already checked but i did not found copy paste method for this. I was expecting if someone could reply the method name which is "duplicate".

            But after two to three hours of study from past three days I learn duplicate method which i never thought it could be possible in different documents.

            Question: Although it works perfectly but can we do this using array. I need only hint or syntax..

            #target Indesign
            var myDoc1 = app.documents.itemByName("doc-main.indd"); 
            var myDoc2 = app.documents.itemByName("doc-to-copy.indd");

            var myFrame1 = myDoc1.pageItems.itemByID(345607);  // page 5
            var myFrame2 = myDoc1.pageItems.itemByID(345725); 
            var myFrame3 = myDoc1.pageItems.itemByID(345799); 

            var myFrame4 = myDoc1.pageItems.itemByID(345873);  // page 8 and so on till page 20


            var myDuplicate1 = myFrame1.duplicate(myDoc2.pages[4]);  //p5
            var myDuplicate2 = myFrame2.duplicate(myDoc2.pages[5]);
            var myDuplicate3 = myFrame3.duplicate(myDoc2.pages[6]);
            var myDuplicate4 = myFrame4.duplicate(myDoc2.pages[7]); // page 9 and so on till page 20