Reputation: 2748
I am creating a new InDesign document with var newDoc = app.documents.add()
.
I am trying to place another pre-existing InDesign document that has paragraph styles into the new document. The reason why I'm not simply using styledDocument.execute()
is that it opens this pre-existing document, whereas I want the document itself to be "Untitled
".
I am attempting to do this with newDoc.place(styledDocument)
, which is not working. The document is untitled as intended, but has the styled document as a link only, and is not populating the Paragrah Styles
window with the styles from the styled document...
File --> Place...
in the InDesign menu to open another InDesign document into this one manually, in which the styles from this document do appear in the Paragrah Styles
window... But I want to programmatically do this. So, I am assuming that File --> Place...
from the InDesign menu is different than newDoc.place(oldDoc)
.
var newDoc = app.documents.add();
newDoc.place(styledDocument);
Upvotes: 0
Views: 798
Reputation: 2193
Wawawaaa, what is your final intention ? Load styles from doc A into Doc B ? If that so, why not use the document's importStyles method ? If you do want to import document as an image, you can use the place method and specify the document as any other image file.
Upvotes: 1