Unlock Master Page Items by Label in Adobe InDesign

Automatically override and unlock master page elements across all pages using labels.

πŸ“œ Get the Script: UnlockByLabel.jsx on GitHub


Demonstration of master item unlock in InDesign

Overview

UnlockByLabel.jsx is a JavaScript (ExtendScript) tool for Adobe InDesign that lets you automatically override and unlock master page elements based on their Script Label. It's ideal for layout workflows where shared graphic elements (like filigree frames or background images) need to be customized per page.

πŸ’‘ How It Works

The script scans each page, looks at its applied master page, and then finds and unlocks specific master items with labels that match a provided list.


1️⃣ Label Items on Your Master Page

Open your master page, select the item (image frame, text box, etc.), then open Window > Utilities > Script Label and assign a label like FiligreeImage.

GIF showing labeling of a master item

2️⃣ Add the Script to InDesign

Create a new `.jsx` file in your InDesign Scripts Panel folder. Paste in the full UnlockByLabel script, then run it from the Scripts panel inside InDesign.


// Label targets
var labelsToUnlock = ["FiligreeImage", "BackgroundImage"];
...
// Loop through pages and unlock matching master items
if (String(item.label) === labelToFind) {
    var overriddenItem = item.override(page);
    overriddenItem.locked = false;
}
        

3️⃣ Run the Script

Once your file is ready and the script is installed, double-click it from the InDesign Scripts panel. You’ll get a popup summary and full console log of all processed items.

Running the script from InDesign Scripts panel

🧰 Customizing the Script

Want to target different labels? Just modify this line:


var labelsToUnlock = ["FiligreeImage", "BackgroundImage", "YourCustomLabel"];
        

The script will only unlock items that aren’t already overridden, so it's safe to run multiple times during your workflow.

πŸ›  Tips & Notes

πŸš€ Get Started

Download the full script, assign labels, and unlock items automatically across your entire document in seconds.

πŸ”— Full Source Code: UnlockByLabel.jsx on GitHub