Here's what I'd like to be able to do.
You have a rectangle with no fill but inside this rectangle you have two others. The key is that the outer rectangle is in front of all others. If you grab the regular eyedropper tool that's on the main toolbar you can "pluck" the color from any shape but you cannot fill any shape that's within the outer "front" rectangle. Would be nice if I could grab the one I want to change and either have an option to "fill from other shape" whereby invoking the arrow to let me choose the other shape OR hit a macro shortcut to invoke the other eyedropper tool in the image above.
This doesn't follow the workflow that you describe, but perhaps it would work for you:
Option Explicit Dim fillStored As Fill Sub store_fill_from_selection() Dim sr As ShapeRange Set sr = ActiveSelectionRange If sr.Count = 1 Then Set fillStored = ActiveShape.Fill.GetCopy Else MsgBox "Exactly one shape must be selected.", vbInformation, "get_fill_from_object()" End If End Sub Sub apply_stored_fill_to_selection() Dim sr As ShapeRange Dim s As Shape Set sr = ActiveSelectionRange If sr.Count > 0 Then For Each s In sr s.Fill = fillStored Next s Else MsgBox "Nothing is selected.", vbInformation, "apply_stored_fill_to_object()" End If End Sub
If you add those as Commands to some of the right-click context menus that are available when objects are selected, or assign keyboard shortcuts to them, those might be useful if you have to do a lot of "get fill from A, then apply it to B, C, D, J, K, L,..." You don't have to use the color right away after storing it, either, as it will be persistent for the CorelDRAW session.
In the thread I had linked to, you noted some problems using the Ctrl+Shift+E with different color spaces. I don't think that will be a problem with this macro; it's using the fill, not sampling a color the way the eyedropper tool does.
Bonus: not limited to uniform color fills!
You can of course polish it up, e.g., using a CommandGroup for the apply operation, adding error handling, adding validation of the selection...
"Eskimo". Yes, I use the drag and drop method but I have found occasions where it doesn't work as desired. I just made a SendKey macro and moved it down next to the fill on the status bar and gave it the eyedropper icon. I think it'll come in quite handy.
I already have a long list of keyboard shortcuts memorized but for some reason I seem to have reached my threshold for remembering them. Now I have a visual.
Thanks all.
Hmmm...what about the outline fill eyedropper? Is there a shortcut already?
The macro approach to store / apply can be used for outline color, too:
Option Explicit Dim colorStored As Color Sub store_outline_color_from_selection() Dim sr As ShapeRange Set sr = ActiveSelectionRange If sr.Count = 1 Then Set colorStored = ActiveShape.Outline.Color.GetCopy Else MsgBox "Exactly one shape must be selected.", vbInformation, "get_fill_from_object()" End If End Sub Sub apply_stored_color_to_selection_outline() Dim sr As ShapeRange Dim s As Shape Set sr = ActiveSelectionRange If sr.Count > 0 Then For Each s In sr s.Outline.Color = colorStored Next s Else MsgBox "Nothing is selected.", vbInformation, "apply_stored_fill_to_object()" End If End Sub
Myron said:I already have a long list of keyboard shortcuts memorized but for some reason I seem to have reached my threshold for remembering them. Now I have a visual.
I think that I have made similar comments in the past. Some folks think that keyboard shortcuts are the answer to everything - and they just aren't, for me. I have to use one fairly often for it to stick.
For some things, modifying the context menus has been a good compromise for me. That puts some tools only two clicks away when I need them, but they don't take up space on the screen all the time.
I've removed a lot of stuff that I rarely use from those context menus, so they are a lot shorter than they were in the factory default configuration.