6 Replies Latest reply on Jul 14, 2008 12:11 PM by (AdamN)

    [CS3][VBS] Delete Unused Swatches ALSO clears Gradient Swatches!

      Hi Folks!

      Heres another weird one. This code deletes unused CMYK swatches properly but also sets the background of some gradient swatches to black.

      myUnusedSwatches = currentdoc.UnusedSwatches.Count
      For myLoop = 1 To myUnusedSwatches
      On Error Resume Next
      Set myUnusedSwatches = currentdoc.UnusedSwatches.Item(1)

      *** I even through this in as a last ditch solution, but it only works sometimes***
      if instr(lcase(currentdoc.unusedswatches.item(1).name), "gradient") = 0 then
      else myUnusedSwatches.Save
      end if


      Any ideas?