How to save a color to palette without recreating it. (Word, 2002)

B

b4a5s

I'm doing a Table and each cell has one of four background colors. They are
not on the default "Fill Colors", so I have to go in and reselect the RGB
each time. How can I put the color on the palette? Or is there another way
to save it so all I have to do is click on it when I need that color?
 
J

Jay Freedman

I'm doing a Table and each cell has one of four background colors. They are
not on the default "Fill Colors", so I have to go in and reselect the RGB
each time. How can I put the color on the palette? Or is there another way
to save it so all I have to do is click on it when I need that color?

You can record or write four macros, one to apply each color, and put
buttons on a toolbar to run the macros.

If you record a macro while you apply a shaded background to a cell,
you'll get something like this:

Sub Sample()
Selection.Shading.Texture = wdTextureNone
Selection.Shading.ForegroundPatternColor = wdColorAutomatic
Selection.Shading.BackgroundPatternColor = 11182170
End Sub

The number represents the RGB color, by a rather complex formula. But
it's easy to write a macro that's more understandable, like this one
(see http://www.gmayor.com/installing_macro.htm if needed):

Sub BlueShade()
Selection.Shading.BackgroundPatternColor = _
RGB(red:=80, green:=184, blue:=244)
End Sub

To make the other macros, just change the name BlueShade to something
that describes another color, and change the numbers for red, green,
and blue.

To make buttons for the macros, see
http://www.word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToToolbar.htm.
 
T

Tony Jollans

The colours should show under "Recent Colors" on the colour palette if they
are 'non-standard' and have been used recently (in the current Word
session).
 

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