Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2005

Tip: Looking for answers? Try searching our database.

Color conversion

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
androo... - 01 Nov 2005 20:09 GMT
In code how do I convert an RGB value to Words own color value (MsoRGBType)?

That is convert  RGB(12, 106, 182) to 11954700 and back again.

Thanks,
androoooooooooooooooooo........................
Tony Jollans - 01 Nov 2005 20:41 GMT
To convert a triple to anumber use the built-in RGB function ...

MsgBox RGB(12, 106, 182)

To do it the other way requires arithmetic. It's not much use as a string
but this gives you the calculation ..

RGBNum = 11954700
MsgBox RGBNum Mod 256 & ", " & (RGBNum \ 256) Mod 256 & ", " & RGBNum \ 256
^ 2

--
Enjoy,
Tony

> In code how do I convert an RGB value to Words own color value (MsoRGBType)?
>
> That is convert  RGB(12, 106, 182) to 11954700 and back again.
>
> Thanks,
> androoooooooooooooooooo........................
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.