• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Change section page number

Guest
Feb 13, 2017 Feb 13, 2017

Copy link to clipboard

Copied

In my document have multiple section.

I need to change the page number of first page. But its throwing error

Error: Must set continue numbering as false before changing page number start.

Also i need to change the existing page number of another section

Its throwing Another section already exists on this page.

How to change this please advice.

TOPICS
Scripting

Views

939

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Aug 21, 2018 Aug 21, 2018

Hi there,

Try this below code. This might help you!

var c = 0;

while(c < app.activeDocument.pages.length){

    try{

        var sec = app.activeDocument.sections.add(app.activeDocument.pages);

        sec.continueNumbering = false;

        sec.pageNumberStart = 1;

        }

    catch(e){

        var sec = app.activeDocument.sections[0];

        sec.continueNumbering = false;

        sec.pageNumberStart = 1;

        }

    c++;

    }

Votes

Translate

Translate
Advocate ,
Aug 21, 2018 Aug 21, 2018

Copy link to clipboard

Copied

LATEST

Hi there,

Try this below code. This might help you!

var c = 0;

while(c < app.activeDocument.pages.length){

    try{

        var sec = app.activeDocument.sections.add(app.activeDocument.pages);

        sec.continueNumbering = false;

        sec.pageNumberStart = 1;

        }

    catch(e){

        var sec = app.activeDocument.sections[0];

        sec.continueNumbering = false;

        sec.pageNumberStart = 1;

        }

    c++;

    }

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines