As far as I know, that's the way it works when you paste. You don't have to deal with it after each paste operation, though, unless you want to. The easiest method I can think of is simply to select the unwanted swatch copies and delete them, picking the original from the list when ID asks what to use instead.
Hi Peter, and thanks! That method would yield the same results as the Merge Color thing, and would require about the same amount of manual action.
I am aiming for a work flow as automated as possible here. ;-) An option (in Preferences, perhaps?) to have Color Swatches behave the same way as Styles when copied between documents would possibly have solved this particular problem.
Attach the script to a key command and run it instead of Paste:
tell application "Adobe InDesign CS5.5"
set myDoc to active document
--get the list of document swatches before the paste
set currentColors to name of every swatch of myDoc
--get a new list which would include duplicates
set newColors to name of every swatch of myDoc
--find the duplicates and merge with the original
repeat with i from 1 to number of items in newColors
set c to item i of newColors
--the duplicate has a space + 2 added to its name so get its name minus 2 characters
if c is not in currentColors then
set mergename to characters 1 thru ((count of characters of c) - 2) of c as string
--merge with the original swatch
merge swatch mergename of myDoc with swatch c of myDoc
That is awsome, Rob, thanks! I'm going to test it on the Mac shortly and I would surely like to see a JavScript version. It's still a workaround though, but I'm going to see if I in some way can automate this.
I sure appreciate your effort!
You should be able to set the Command-V key command to the script and override the default paste, then the destination swatches would always be used. Obviously the color values of the source swatch will always be changed—if that matters?.
If you want it to work for Paste Into or Paste in Place you'll need to make separate versions and replace the paste command with paste into or paste in place (all lowercase)