Using macro to change colours

Hello,

Our preproduction team are having issues with different blacks in a file before print. We want to be able to run a macro that can go through a file and change all 100% black objects/ outlines etc from C:100 M:100 Y:100 L:100 to C:0 M:0 Y:0 K:100. 

Is this something to record myself or does it need a written script?

Parents
No Data
Reply
  • Use this and tweak the code as needed. We don't print anything with just 100% black. We had used the C45 M45 Y45 K100 as seen in the code but have since switched to using R0 G0 B0. Richer black and smaller file sizes for the print RIP.

    Sub ConvertBlacks()
    ActiveDocument.BeginCommandGroup "ConvertBlacks"
    Dim sr As ShapeRange
    Set sr = ActivePage.Shapes.FindShapes(Query:="@fill.color.cmyk[.c=0 and .m=0 and .y=0 and .k=100]")
    sr.AddToSelection
    sr.ApplyUniformFill CreateRGBColor(0, 0, 0)
    Set sr = ActivePage.Shapes.FindShapes(Query:="@fill.color.cmyk[.c=45 and .m=45 and .y=45 and .k=100]")
    sr.AddToSelection
    sr.ApplyUniformFill CreateRGBColor(0, 0, 0)
    Set sr = ActivePage.Shapes.FindShapes(Query:="@fill.color.cmyk[.c=100 and .m=100 and .y=100 and .k=100]")
    sr.AddToSelection
    sr.ApplyUniformFill CreateRGBColor(0, 0, 0)
    Set sr = ActivePage.Shapes.FindShapes(Query:="@fill.color.cmyk[.c=75 and .m=68 and .y=65 and .k=90]")
    sr.AddToSelection
    sr.ApplyUniformFill CreateRGBColor(0, 0, 0)
    ActiveSelectionRange.RemoveFromSelection
    Set sr = ActivePage.Shapes.FindShapes(Query:="@outline.color.cmyk[.c=45 and .m=45 and .y=45 and .k=100]")
    sr.AddToSelection
    sr.SetOutlineProperties , OutlineStyles(0), CreateRGBColor(0, 0, 0)
    ActiveSelectionRange.RemoveFromSelection
    Set sr = ActivePage.Shapes.FindShapes(Query:="@outline.color.cmyk[.c=0 and .m=0 and .y=0 and .k=100]")
    sr.AddToSelection
    sr.SetOutlineProperties , OutlineStyles(0), CreateRGBColor(0, 0, 0)
    sr.AddToSelection
    Set sr = ActivePage.Shapes.FindShapes(Query:="@outline.color.cmyk[.c=75 and .m=68 and .y=65 and .k=90]")
    sr.AddToSelection
    sr.SetOutlineProperties , OutlineStyles(0), CreateRGBColor(0, 0, 0)
    Set sr = ActivePage.Shapes.FindShapes(Query:="@outline.color.cmyk[.c=100 and .m=100 and .y=100 and .k=100]")
    sr.AddToSelection
    sr.SetOutlineProperties , OutlineStyles(0), CreateRGBColor(0, 0, 0)
    ActiveSelectionRange.RemoveFromSelection
    ActiveDocument.EndCommandGroup
    End Sub

Children