I\'m rather new to C# and find it almost unspeakable that there isn\'t a simple way for converting an RGB color or system.color to a WdColor!
VB is simple, C# - is i
I thought people might like an extension method:
public static void ColorRGB(this Wd.Font font, int red, int green, int blue)
{
font.Color = (Wd.WdColor)(red + 0x100 * green + 0x10000 * blue);
}
Color c = Colors.Blue;
var wdc = (Microsoft.Office.Interop.Word.WdColor)(c.R + 0x100 * c.G + 0x10000 * c.B);
Add a Reference to Microsoft.VisualBasic dll
using Microsoft.VisualBasic;
int rgbColor = Information.RGB(100, 150, 75);
Word.WdColor wdColor = (Word.WdColor)rgbColor;