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...
It is possible from
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)
.
Here is my code (which is not working):
var newDoc = app.documents.add();
newDoc.place(styledDocument);