Reply To: JavaScript for continuously numbering documents

#1236574
Peter Kahrel
Participant

Edward — In what way can you not get it to work? What have you tried? Do you see an error message? Does something happen but not what you expected? Does nothing happen at all? The script works on the first section of every open document. To target all sections in a single document, do this:

app.documents[0].sections.everyItem().continueNumbering = true;

And you could even target all sections in all open documents:

app.documents.everyItem().sections.everyItem().continueNumbering = true;

And, finally, in case you want to open all documents in a book, here’s another one-liner:

app.open (app.activeBook.bookContents.everyItem().fullName);

There are many one-liners!

Peter

This article was last modified on April 5, 2020

Comments (0)

Loading comments...