Error When Moving Paragraph Styles from Group Folder in InDesign CC 2024
Hi,
I am using the below code for move styles from folder but its not working (CC2024).
var doc=app.activeDocument;
var pStyles=doc.paragraphStyles;
var pGroups=doc.paragraphStyleGroups;
for (i=pGroups.length-1; i>=0; i--){
var pStylesInGroup=pGroups[i].paragraphStyles;
for (j=pStylesInGroup.length-1; j>=0; j--){
pStylesInGroup[j].move(LocationOptions.AFTER, doc.allParagraphStyles[1]);
}
}
Getting below Error:
Error: Invalid value for parameter 'reference' of method 'move'. Expected ParagraphStyle, ParagraphStyleGroup, CharacterStyle, CharacterStyleGroup, CellStyle, CellStyleGroup, TableStyle, TableStyleGroup, Document or Application, but received ParagraphStyle.
<Title renamed by MOD>
