TOOLBOX / TUTORIAL
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
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.
- 🔍 Finds items by Script Label on applied master pages.
- 🔓 Unlocks and overrides them per document page.
- 📝 Logs detailed output for each processed page and label.
💡 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.
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.
🧰 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
- 📌 Don't duplicate labels across unrelated elements.
- ♻️ Re-run safe: Already-overridden items are skipped without error.
- ⚙️ Extend it: Add repositioning, scaling, or styling logic after unlock if needed.
🚀 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