AdjustLayoutPreference Object Properties Not Working in InDesign 2025 & 2026 Scripts
Hi All,
I am using Indesign 2025 and 2026; I would like to enable the "Adjust Layout" option in my documents through the Indesign scripting by using "AdjustLayoutPreferences" object properties as in InDesign ExtendScript API Model, but Indesign throwed error is "Eval Error (#55): "Object does not support the property or method 'adjustLayoutPreferences'".
below is my code:
var myDocument = app.activeDocument;
try {
myDocument.layoutAdjustmentPreferences.enableLayoutAdjustment=true;
myDocument.layoutAdjustmentPreferences.allowGraphicsToResize=false;
myDocument.layoutAdjustmentPreferences.allowRulerGuidesToMove=false;
myDocument.layoutAdjustmentPreferences.ignoreObjectOrLayerLocks=true;
myDocument.layoutAdjustmentPreferences.ignoreRulerGuideAlignments=true;
myDocument.layoutAdjustmentPreferences.snapZone = 0;
} catch (error) {
myDocument.adjustLayoutPreferences.enableAutoAdjustMargins=true;
myDocument.adjustLayoutPreferences.enableAdjustLayout=true;
myDocument.adjustLayoutPreferences.allowLockedObjectsToAdjust=true;
myDocument.adjustLayoutPreferences.enableAdjustLayout=true;
}
Could someone please check and suggest, how to resolve this issue?
Regards,
Mani