Reset the start number of my sections
hello everyone, i have a document with multiple sections and i would like it to reset me the number of each section by 1 instead of doing it every time by hand going through the numbering and section options.
I created this code:
var startPage = 1;
for (var i = 0; i < app.activeDocument.sections.length; i++) {
var section = app.activeDocument.sections[i];
section. continueNumbering = false;
section. startPageNumber = startPage;
startPage = section.pages.length + startPage;
}
but it gives me the following error:
JavaScript Error
Error number: 55
Error string Object does not support the property or method
'startPageNumber'
hand motor
File: /Users/magnetik85/Library/Preferences/Adobe
InDesign/Version 17.0/en_US/Scripts/Panel Scripts/Reset Section
number.jsx
Line 5
Source section.startPageNumber = startPage;
The error means that the 'startPageNumber' property is not supported by the 'section' object.
Is there another way I can manage to reset the number of my sections starting from the number 1 without doing it manually?
