[JS] Remove Start section from selected pages in page panel
I have a document that has every page set as "start section" on every page causing numbering issues if any pages are added/removed. I am trying to write a JS to remove Start section from all pages seclected in pages panel since the program will only change the page selected rather than multiples and I have several books with this issue.
what I have so far with my base level knowledge of coding but it is breaking from the start so I must be doing something wrong.
var pages = app.selection[0].pages;
for (var i = 0; i < pages.length; i++) {
var page = pages[i];
var section = page.parent.sections.itemByName("start"); if (section != null) {
section.remove();
}
page.numberingContinues = true;
}
