View Single Post
  #2  
Old 13-12-2011, 13:32
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Color Values

There are several ways to do this, you can use the Split Function like this:
Code:
Sub MyColor()
    Dim vColor As Variant
    
    vColor = Split(ActiveShape.Fill.UniformColor.ToString, ",")
    
    MsgBox "Mode: " & vColor(0) & " C: " & vColor(2) & " M: " & vColor(3) & " Y: " & vColor(4) & " K: " & vColor(5)
End Sub
or you can just grab each component color like this:
Code:
Sub MyColor()
    Dim c As Color
    
    Set c = ActiveShape.Fill.UniformColor
    
    MsgBox "C: " & c.CMYKCyan & " M: " & c.CMYKMagenta & " Y: " & c.CMYKYellow & " K: " & c.CMYKBlack
End Sub
Hope that helps,

-Shelby
Reply With Quote