Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


script about jump to masterpage

Community Beginner ,
Sep 06, 2021 Sep 06, 2021

Copy link to clipboard

Copied

Hello all professional members,

have someone can teach me a script how to jump to master page A (when I have master B, master C, etc)

 

I jsut found a similar one but it just based on the page applied whcih master to jump...

can't jump to specific master page A...

many thanks if someone can teach me!

 

try {
var page = app.windows[0].activePage;

if (page.appliedMaster.pages.length === 0) {
}
app.windows[0].activePage = page.appliedMaster.pages[];
} catch (e)
{
}

TOPICS
Scripting

Views

40

Likes

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

Adobe Community Professional , Sep 06, 2021 Sep 06, 2021
Hi miloes329, try the following script snippet where you have to change the name of the master if you do not have an English version of InDesign: // NOTE: The name can be different in different localized versions of InDesign. // And the name of the master could also be renamed of course. var nameOfMaster = "A-Master"; var masterSpread = app.documents[0].masterSpreads.itemByName( nameOfMaster ); if( masterSpread.isValid ) { app.layoutWindows[0].activeSpread = masterSpread ; }else { alert( "Ma...

Likes

Translate

Translate
Adobe Community Professional ,
Sep 06, 2021 Sep 06, 2021

Copy link to clipboard

Copied

Hi miloes329,

try the following script snippet where you have to change the name of the master if you do not have an English version of InDesign:

// NOTE: The name can be different in different localized versions of InDesign.
// And the name of the master could  also be renamed of course.
var nameOfMaster = "A-Master";
var masterSpread = app.documents[0].masterSpreads.itemByName( nameOfMaster );

if( masterSpread.isValid )
{
	app.layoutWindows[0].activeSpread = masterSpread ;
}else
{
	alert( "Master not found:" + "\r" + nameOfMaster )
};

 

Regards,
Uwe Laubender

( ACP )

Likes

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
Community Beginner ,
Sep 06, 2021 Sep 06, 2021

Copy link to clipboard

Copied

LATEST

It works perfectly!

Thanks Laubender!!

Likes

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