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

Apply master to other masters

Community Beginner ,
Feb 12, 2023 Feb 12, 2023

Copy link to clipboard

Copied

Is there a way to apply the master page A-Project to 1-Project, 2-Project, 3-Project...etc all at once? I searched everywhere but couldn't find a solution.

 

Project.png

TOPICS
How to , Scripting

Views

250

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

Community Expert , Feb 12, 2023 Feb 12, 2023

Hi @Rachel28371239g14w, here's a quick little script:

/*
 * Apply Master to Project Masters
 * @discussion https://community.adobe.com/t5/indesign-discussions/apply-master-to-other-masters/m-p/13573264
 */
function main() {

    var doc = app.activeDocument,
        matchProjectPageNames = /^\d+-Project$/,
        masterPage = doc.masterSpreads.itemByName('A-Project');

    if (!masterPage.isValid) {
        alert('Master page is not valid.');
        return;
    }

    for (var i = 0; i < doc.m
...

Votes

Translate

Translate
Community Expert ,
Feb 12, 2023 Feb 12, 2023

Copy link to clipboard

Copied

Hi @Rachel28371239g14w, here's a quick little script:

/*
 * Apply Master to Project Masters
 * @discussion https://community.adobe.com/t5/indesign-discussions/apply-master-to-other-masters/m-p/13573264
 */
function main() {

    var doc = app.activeDocument,
        matchProjectPageNames = /^\d+-Project$/,
        masterPage = doc.masterSpreads.itemByName('A-Project');

    if (!masterPage.isValid) {
        alert('Master page is not valid.');
        return;
    }

    for (var i = 0; i < doc.masterSpreads.length; i++)
        if (matchProjectPageNames.test(doc.masterSpreads[i].name))
            doc.masterSpreads[i].appliedMaster = masterPage;

} // end main

app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, 'Apply Master to Project Masters');

- Mark

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
Community Beginner ,
Feb 12, 2023 Feb 12, 2023

Copy link to clipboard

Copied

Amazing. Thank you loads!

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
Community Expert ,
Feb 12, 2023 Feb 12, 2023

Copy link to clipboard

Copied

LATEST

You're welcome!

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