Skip to main content
June 4, 2012
Answered

Placed in an InDesign document other InDesign attached file on a specific page

  • June 4, 2012
  • 2 replies
  • 2421 views

(inserted into another file indesign indesign on a specific page)

Hey all !

I'm trying using Script:

1. in a document already open indesign:

var myDoc = app.activeDocument;

2. place another file. indd 

app.open(File("/c/myTestDocument.indd")); ----> code and not well



3. also be inserted in a specific page, (eg on page 12 of my active.Document or any other page)

var addPages = 2;
// Page number 2 is item(1), since page number 1 is item(0):
var addAfter = app.activeDocument.pages.item(2);

 

to see if I can give Script code to get the result.

thank you very much hope to answer please.

Raul.


This topic has been closed for replies.
Correct answer Harbs.

how to export?

multiple pages ( Paginate Pages / Spreads )

var myDoc = app.activeDocument;

var myPage = myDoc.pages.item(0);

myPage.place(File("/c/myTestDocument.indd"));  ---> only one page ( my document indd = two page)

What would SCRIPT code right?

var myDoc = app.activeDocument;

var myPage = myDoc.pages.item(0);

myPage.placemultiple(File("/c/myTestDocument.indd"));  not right

Very thanks, this answer close theme. (if the result is right)


This one's a bit weird:

var myDoc = app.activeDocument;

app.importedPageAttributes.pageNumber = 1;

var myPage = myDoc.pages.item(0);

myPage.place(File("/c/myTestDocument.indd"));

app.importedPageAttributes.pageNumber = 2;

var myPage = myDoc.pages.item(1);

myPage.place(File("/c/myTestDocument.indd"));

Harbs

2 replies

Larry G. Schneider
Community Expert
Community Expert
June 5, 2012

For starters to place a file you would use app.place, not app.open.

June 6, 2012

Hey and thanks for answer

But how would the code to put place file on a specific page the my Document active?

thank you very much,

Raúl.

David_Adam_Gibson
Participant
June 13, 2012

Hello Raul,

I have just manged this with:

var myDoc = app.activeDocument;

var myPage = myDoc.pages.item(0);

myPage.place(File("/c/myTestDocument.indd"));

Looks like you need to use "place" for a page.

Cheers,

David

June 5, 2012

any answers please

Thanks,