Answered
How to append all styles to new document from current document in indesign using javascript
var spDoc =app.documents[0];
var allPstyles = spDoc.allParagraphStyles;
var allCstyles = spDoc.allCharacterStyles;
spDoc.close();
var newDoc = app.documents[1];
for(var a=0; a<allPstyles.length;a++){
newDoc.paragraphStyles.add(allPstyles[0]);
}I tried like this I am getting the styles as object but I don't know how to add it in new document!
