Adding a colour permanently to the MS Office colour palette

L

LNA

Can anyone tell me how I can save a corporate colour into our colour palette
without having to highlight an existing colour text and going to the 'more
colours' option?
 
A

Arvin Meyer [MVP]

LNA said:
Can anyone tell me how I can save a corporate colour into our colour
palette
without having to highlight an existing colour text and going to the 'more
colours' option?

You can save it as a function, then call it and use the function to change a
property in every form. For instance:

Public Function fMagenta()
fMagenta = 8388608
End Function

Now use it to change all the textbox forecolor properties.

Or if you're just doing a form every now and then, just put it a module and
comment it out like:

' 8388608

Then just copy it when needed and select all the controls you wish and apply
it.
 
L

LNA

Thanks for your reply Arvin, but I'm not sure what you mean - I'm a lay
person. How do I:
1. Get to the 'function' menu.
2. How does the 'function' menu know the colour I want.
3. Would I save or give my colour a name?
 
P

Piet Linden

Thanks for your reply Arvin, but I'm not sure what you mean - I'm a lay
person.  How do I:
1.  Get to the 'function' menu.
2.  How does the 'function' menu know the colour I want.
3.  Would I save or give my colour a name?

1. open a new code module, then create the function. You could just
type the information in and then compile it.

Then, because it's a public function, you can call it from anywhere.
And you can use fMagenta() in place of the actual RGB color value
(which nobody remembers anyway).

2. there is no menu... you declared the color with a name (of the
function).

3. Saving the function gives your color a name.... Instead of
referring to the color by it's RGB value, you could call it whatever
you want. (so that's what the fMagenta() is about.)
 
L

LNA

OK, I'm thinking this information is for Access - am I right? Is it possible
to do this in Word 2003 somehow?
 
A

Arvin Meyer [MVP]

Open a new Standard Module do a new Procedure and type it in exactly like
below, except with your function name instead of fMagenta so it could look
like:

Public Function CorpColor()
CorpColor = placeholder
End Function

Now go back to the form and use the color picker to get the color you want.
Put the number of that color, from your form to the placeholder, so now it
may look something like:

Public Function CorpColor()
CorpColor = 8388608
End Function

except with your color number. You can also use the RGB values from the
color picker Like:

Public Function CorpColor()
CorpColor = RGB(0,0,128)
End Function

But that reduces you to 16 bit color values.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
 
A

Arvin Meyer [MVP]

LNA said:
OK, I'm thinking this information is for Access - am I right? Is it
possible
to do this in Word 2003 somehow?

Yes, but much harder. You'll need to do the entire thing in code,
identifying which text will be colored. It is orders of magnitude more
difficult. You'll also need to ask the question in a Word newsgroup to get a
more specific answer.
 

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