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

Where is the “Inner Margin” option for enableTextFrameGeneralOptions? I can't find it.

Guide ,
Oct 01, 2025 Oct 01, 2025

I don't know what its English name is.
So I often can't find it.

Perhaps it should be called TextFrameOptions.

 

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#ObjectStyle.html
In the English version ID, is what I see on the interface the same as the name in ExtendScript?

 

Perhaps it's here? But I'm not sure which one.
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#ChangeObjectPreference.html

 

Inner margin.png

TOPICS
How to , Scripting
80
Translate
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 ,
Oct 01, 2025 Oct 01, 2025

insetSpacing

Translate
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
Guide ,
Oct 01, 2025 Oct 01, 2025

Thanks Peter Kahrel
Thanks

 
app.documents[0].objectStyles.itemByName(AA).properties =
{
textFramePreferencesInsetSpacing: [6, 0, 0, 0],
Spacing: [6, 0, 0, 0],
}
Neither of these worked.

 

Can't it be written in the properties?
Is this the only way to write it?

app.documents[0].objectStyles.itemByName(“AA”).textFramePreferences.insetSpacing = [6, 0, 0, 0]
Translate
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 ,
Oct 01, 2025 Oct 01, 2025

Your first code sample doesn't work because AA should be in quotes and the properties should be like this:

 

app.documents[0].objectStyles.itemByName('AA').properties =
{
textFramePreferences : {insetSpacing: [6, 0, 0, 0]}
}

 

Your second codde sample doesn't work because you used curly quotes. Use straight quotes and the one-liner works fine.

 

app.documents[0].objectStyles.itemByName('AA').textFramePreferences.insetSpacing = [6, 0, 0, 0]

 

Translate
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
Guide ,
Oct 01, 2025 Oct 01, 2025
enableTextFrameGeneralOptions: true,
textFramePreferences: { insetSpacing: [3 * 2.834645, 0, 0, 0] },

textFramePreferences: { insetSpacing: [3 * 2.834645, 0, 0, 0] }, This line seems incorrect.

Does not work when used in properties.


However, it works when used independently below.

app.documents[0].objectStyleGroups.itemByName(capObjGroStn). objectStyles.itemByName(capObjCStn).textFramePreferences.insetSpacing = [3 * 2.834645, 0, 0, 0]

 

 

 

Translate
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
Guide ,
Oct 01, 2025 Oct 01, 2025
LATEST

Seems right again, must be a line break?
textFramePreferences: {
insetSpacing: [3 * 2.834645, 0, 0, 0],
}

Translate
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