Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

[JS CS6] paste onto active document from external .indd

$
0
0

Hey everyone, i'm at a complete loss with this, tried loads of examples from this forum etc and cant get anywhere so i've given up!

 

All i'm trying to acheive is to prompt the user for a code, then that refrences an indesign file in a folder, this is all working ok, we have a variable called BMDFile with a full file path ready to go, but I can't figure out how to get this file on a currently open document in an editable format.

 

I just want it to paste from an indesign file onto this empty doc

 

I'm trying to edit this example from the forum now...

 

var doc1 = app.documents[1]; //  needs to be from an external .indd file (variable BMDFile already contains a full path)

var doc2 = app.documents[0];  // paste to

 

for(i=0; i<doc1.pages.length; i++)

{

    if(doc2.pages.length < i+1){

        doc2.pages.add();

    }

    doc1.pages[i].pageItems.everyItem().duplicate(doc2.pages[i]);

}

 

Thanks in advance!


Viewing all articles
Browse latest Browse all 15932

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>