CQLFindSame.bas 755 B

123456789101112131415161718192021222324
  1. Attribute VB_Name = "CQLFindSame"
  2. Public Function CQLline_CM100()
  3. On Error GoTo ErrorHandler
  4. API.BeginOpt
  5. Dim cm(5) As Color, i As Long
  6. Set cm(0) = CreateCMYKColor(100, 0, 100, 0) '// ÂÌ
  7. Set cm(1) = CreateCMYKColor(0, 100, 0, 0) '// Ñóºì
  8. Set cm(2) = CreateCMYKColor(100, 100, 0, 0) '// ºì
  9. Set cm(3) = CreateRGBColor(0, 255, 0) '// RGB ÂÌ
  10. Set cm(4) = CreateRGBColor(255, 0, 0) '// RGB ºì
  11. ActiveDocument.ClearSelection
  12. For i = 0 To 4
  13. cm(i).ConvertToRGB
  14. r = cm(i).RGBRed
  15. G = cm(i).RGBGreen
  16. b = cm(i).RGBBlue
  17. ActivePage.Shapes.FindShapes(Query:="@Outline.Color.rgb[.r='" & r & "' And .g='" & G & "' And .b='" & b & "']").AddToSelection
  18. Next i
  19. ErrorHandler:
  20. API.EndOpt
  21. End Function