VBA- Working with the recently used colors

M

Mel

Hi. In PPT 2003, I want to build a macro that will add a color to the
CUSTOM or "Recently Used Colors" area in the tools for Fill/Line Color
for autoshapes. I want the code to do this without actually having to
use that color first. The code would contain RGB numbers.

Basically, when I click a custom button on the toolbar it would
emulate having used that color and placed it as the first of 8 colors
in that tool area that shows recently used colors. When I click
another like button but coded with different RGB, it places that color
in the first spot and shifts the others to the right like it normally
does when using colors.

Does anyone have any code for that or ideas? Thanks.

-Melina
 
M

Mel

Thank you, Shyam. BTW, I misspoke about the colors going into the
first position and the others shifting right. Instead, it just adds
the new color to the right of the last color that was added, which is
ok, but is there any way to control which position the color is added
to? I know I'm pushing it <g>, but just in case, I thought I'd ask.

-Melina
 
M

Mel

That's a great idea. Thanks. I'll add colors one at a time as needed,
but this would be handy if I could add my new color plus the the other
(0-7) colors present, so my new color lands in the first position or
some other set position.

Do you or Shyam know if there's a way to read what colors are already
in the slots? I'm trying to think of a way to know which position my
new color goes in to because sometimes these are very similar colors
with just a shade difference. If I didn't know the slot it went in to,
it might be challenging to figure it out. I was thinking even if I
could capture it in the code and then conclude it all with a msgbox
telling me which position the new color went in to?

Any hope for something like that or any other thoughts on how to
report the slot number used?

Thanks for both of your expertise,
Melina
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top