Copy link to clipboard
Copied
I have two InDesign files: a.indd and b.indd. Each of these files has a swatch named "red", with the same name but different CMYK values.
Steps to reproduce the issue (this problem occurs in all Mac versions of InDesign, Windows version is unknown).
Up to this point, everything works normally.
Next, open b.indd and repeat steps 1-3. This time, when you select the color swatch, an incremental number (starting from 2) appears after the color name (e.g., "red 2"). After executing the change, new swatches with these incremented names (e.g., "red 2", "red 3",...) are added to the Swatches panel.
※ If you quit and restart the InDesign application before performing the operation in b.indd, this problem does not occur.
Is this a bug?
Copy link to clipboard
Copied
You'd have to supply the files.
But can you try exporting the files as IDML - then open these in indesign and save as a new file name.
See if the issue persists.
If it does, you can attach the IDML documents here for testing.
Copy link to clipboard
Copied
Thanks.
I've tested both the IDML file and the InDesign file converted from idml, and they both have the same issue. These files were created in InDesign 2020, but based on my testing, this problem exists in all versions from 2020 to 2025.
Copy link to clipboard
Copied
Hi @john-9874,
Thanks a lot for the detailed explanation and for already testing with IDML versions.
To look into this further with the team, could you please confirm the details of your operating system? Also, if possible, it would be great if you could share a quick screen recording showing the exact steps you're following, from using Find/Change in file a.indd to switching to b.indd and when the swatch name starts incrementing. That would really help us observe the behavior in real time and better understand what's triggering it.
Looking forward to your update!
Abhishek
Copy link to clipboard
Copied
I made a screen recording. My OS is OSX Sequoia 15.5 (Apple M2 Max)。 But this bug(?) can be reproduced on other versions of OSX as well.
My steps:
1. Quit InDesign 2020
2. Open a.indd and b.indd files (even if you only open a.indd first, and then open b.indd after color retrieval and replacement, you will encounter the same problem)
3. Find and replace on a.indd: 1. keyword :test; 2. font color: red; 3.scope: document (not all documents).. Execute the replacement.
4,Close a.indd. (If you quit the indesign app, you won't have the problem I mentioned)
5,Repeat 3-4 on b.indd.
I initially found this problem in my code, which is as follows (probably the code is easier to understand than what I'm saying).
var files = [
"a.indd",
"b.indd",
];
var curPath = new File($.fileName).path;
var len = files.length;
for (var i = 0; i < len; i++) {
var doc = app.open(new File(curPath + "/" + files[i]));
var redColor = doc.swatches.itemByName("red");
var tf = doc.textFrames.itemByName("*****");//target textFrame: **edit this
changeKeywordColor(tf, "test", redColor);
doc.close(SaveOptions.YES);//close document
}
function changeKeywordColor(textFrameObj, keyWord, colorObj) {
app.findTextPreferences = NothingEnum.nothing;
app.changeTextPreferences = NothingEnum.nothing;
app.changeTextPreferences.fillColor = NothingEnum.nothing;
app.changeTextPreferences.fillColor = colorObj;//red color
app.findTextPreferences.findWhat = keyWord;
textFrameObj.changeText();// Search scope: only the target textFrame
}
Copy link to clipboard
Copied
Hi @john-9874 , I can’t tell from your capture, but what is your Search scope? Is it All Documents? That might cause a conflict between the same named "red" Swatches with different CMYK values.
Copy link to clipboard
Copied
Thanks @rob day . The search scope is : document. Not all documents.
And, I closed the a.indd file before performing the same search-and-replace operation on the b.indd file.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now