how to change system.Drawing. Color - > Word.WdColor

B

bocai

hi, I want set Color for Word.
But the word need the Word.WdColor.***, how to change the Color -> WdColor
?????
 
C

Cindy M -WordMVP-

Hi Bocai,
I want set Color for Word.
But the word need the Word.WdColor.***, how to change the Color -> WdColor
I'm afraid I don't know how converting Word colors to .NET Framework colors
works, other than by trial and error. I suspect, if I understood enough
about how the colors were defined in both systems, I could figure it out.
Perhaps you do understand "color-speak" well enough to get to the bottom of
it if I tell you that the HEX-values of the wdColor enums correspond to the
hex RGB values of the Windows color map:
wdColorRed = &HFF = FF0000 = 255 + 0 + 0
wdColorBlack = 0
wdColorBlue = &HFF0000 = 0000FF = 0 + 0 + 255
wdColorBrightGreen = &HFF00 = 00FF00 = 0 + 255 + 0

Unfortunately, I don't know how the .NET colors map in relation to the
Windows colors...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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