Page 2 of 2 <12
Topic Options
#200649 - 2010-11-18 09:38 AM Re: Formatting an outlook signature [Re: Mart]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
Yes, dragging up an old post but just had to make a small comment.
Simple but I just did not think of it in the past. Stumbled upon this by accident and it works just fine.

I've been busy setting this up for all our people (new job, new company and new challenges since the original post) and marketing has asked me to stick to the fonts and colors in our company guidelines. None of the listed colors match our guidelines so I messed around a bit and tested with RGB color codes. When you start the macro recorder in Word, set the font color to a custom color using RGB values, stop the macro recorder and check the code of the new macro you will get the corresponding numbers that Word understands and can be used to set any custom color you want/need.


Edited by Mart (2010-11-18 09:42 AM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#204005 - 2012-01-03 04:28 PM Re: Formatting an outlook signature [Re: Mart]
meslow Offline
Just in Town

Registered: 2011-12-29
Posts: 2
Loc: France
Tried to use RGB color code in Outlook Signature, I finally found how to make them work.
Microsoft use a strange method for RGB colors, here is how it works :

MS Color code = (Blue*65536) + (Green*256) + Red



For Blue color (R0 G84 B158):
 Code:
$objSelection.Font.Color = "10376192"

Top
#204006 - 2012-01-03 09:20 PM Re: Formatting an outlook signature [Re: meslow]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Welcome to KORG!

Good information, but it isn't that strange, really.

"256" is 8 bits - 0-255. RGB represents 3 8-bit bytes. If you take them together, kind of like a network address (B.G.R), you'll see that Red is the first byte, which is multiplied by 1. Green is the second byte, multiplied by 256, and Blue is the third byte, multiplied by 65536 (or 256 * 256). Thus, the RGB can be represented by a single value of 0 to 16777215 (16 million colors) rather than 3 separate values of 0-255.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#204007 - 2012-01-03 09:42 PM Re: Formatting an outlook signature [Re: Glenn Barnas]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
Looks like maybe a decent conversion UDF waiting there.
Top
#204010 - 2012-01-04 03:05 PM Re: Formatting an outlook signature [Re: ShaneEP]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Simple code allowing either decimal or hex values to be converted.
 Code:
Break On
'Fuschia: '
RGBtoBin(212,48,128) ?
'Gold: '
RGBtoBin(&C0,&AE,&40) ?

Function RGBtoBin($_R, $_G, $_B)

  $RGBtoBin = ($_B * 65536) + ($_G * 256) + $_R
  Exit 0

EndFunction
Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
Page 2 of 2 <12


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 507 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.051 seconds in which 0.025 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org