in reply to Win32::OLE, Word, and BackgroundPatternColor
It's just like HTML colors: three bytes, one per color. However, the order of the bytes is BGR. I.e. 0xFF0000 is fully saturated blue, and 0x0000FF is fully saturated red.
If that gives you more range than you want to work with, you could consider setting the BackgroundPatternColorIndex property instead. The range of possible values is:
1 Black 2 Blue 3 Turquoise 4 BrightGreen 5 Pink 6 Red 7 Yellow 8 White 9 DarkBlue 10 Teal 11 Green 12 Violet 13 DarkRed 14 DarkYellow 15 Gray50 16 Gray25
If you'd like to know how I discovered all that, launch the OLE Browser that comes with ActiveState Perl. (Go to the main page (index.html) of the documentation set installed with AS Perl; look for the first link under the Windows Specific header.) Note - The OLE Browser requires IE to run properly, as it uses an ActiveX control.
Now, in the second frame, find and click "Microsoft Word 11.0 Object Library" (or whatever version is on your system). Now find "Shading" in the third frame. You'll also be looking for WdColor and WdColorIndex in the third frame. (Btw - I also recommend checking "Group elements by type" in the top frame.) HTH, HAND.
|
|---|