Macro select by RGB value
I'm trying to create a macro that will select a fill by an RGB value (R:252, G:249, B:206). So far I haven't been able to get this to work, can anyone help? Please & Thanks
I'm trying to create a macro that will select a fill by an RGB value (R:252, G:249, B:206). So far I haven't been able to get this to work, can anyone help? Please & Thanks
You'll need to load both the macro and submacro, but this should work for your specific need.
Macro SelectFill
Define el as Element
Define RedGreenBlue as String
Define id as String
Select None
#Select if Type is not equal to "Line"
Select All
el = ActiveDoc.FirstSelectedElement
On Error Goto skipError
While (exists(el))
RedGreenBlue = el.fill.colSpec.rgb
#message "~" + RedGreenBlue + "~"
if(RedGreenBlue <> "{RGB 252 249 206}")
Create object_info el
id = el.info.id
Select Object id Toggle
else
end if
RedGreenBlue = ""
el = el.nextSelectedElement
End While
End Macro
SubMacro skipError
End SubMacro
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.