Joel, thanks for taking time to reply when you are not even at the application. I appreciate it. And I also appreciate Abhisheks prompt replies, as they came within the hour of posting. Fortunately, this problem isn't urgently causing me an issue, but I suspect it may come to that again.
None of my files or ID installations are older than 2020, so I don't suspect that's the issue. The only thing I can think of is the possibility of a Word document from the one editor that I work with, though I've been using her files since 2020 and not had this issue until a couple of months ago.
I previously tried the following script that I had ChatGPT write for me, and if failed to run with the following error:
Error Number: 55
Error String: Object does not support the property or method "KinokuSet"
Line 18:
Source: style.kinokuSet = NothingEnum.NOTHING;
The script follows:
// Remove Kinsoku and Mojikumi from all Paragraph Styles in InDesign
(function() {
// Ensure a document is open
if (app.documents.length === 0) {
alert("Please open a document before running this script.");
return;
}
var doc = app.activeDocument;
var paragraphStyles = doc.allParagraphStyles;
// Loop through all paragraph styles
for (var i = 0; i < paragraphStyles.length; i++) {
var style = paragraphStyles[i];
// Only process user-defined paragraph styles (skip defaults)
if (style.name != "[No Paragraph Style]" && style.name != "[Basic Paragraph]") {
style.kinosokuSet = NothingEnum.NOTHING;
style.mojikumi = NothingEnum.NOTHING;
}
}
alert("Kinsoku and Mojikumi settings have been removed from all paragraph styles.");
})();
I'm attaching an INDD file. BodyBase* is one style that has it turned on.
Thanks again for looking at this.
Thanks, I'll give your test file a shot when I get home. I suspect my own syntax is wrong, but ChatGPT is... way off base. If you actualy want to use AI to write JS, there are better tools. A good large language model has to be well groomed.
Take your script, for example. You didn't retype it, did you? You just copied and pasted the script, right? But you had to rekey the error message because it couldn't be copied out of the JS error dialog? Because it's supposed to be "kinsokuSet" throughout. Not "kinokuSet" or "kinosokuSet". So somebody, in some long-gone forum, keyed in a typo when attempting to write up a script that affects kinsoku, and that error was captured by someone compiling an LLM, and never corrected.
Anyhow, I don't know what else might be wrong here, but later today I'll try both scripts against your sample file and we'll see what we get. I bet that I'm supposed to use the "NothingEnum.NOTHING" that the AI used, instead of my own "KinsokuSet.NOTHING"; I'll give it a shot.