R
RobertSeattle
Pretty simple repro:
1. Create some text - change the font color to white via the Word font
2007 UI
2. Select the Text
3. Goto VBA and in the Immediate Windows type ?
Selection.Range.Font.ColorIndex
I'm getting the value of 7 which is the colorindex value wdYellow
instead of 8 - wdWhite.
4. If I do the very same repro steps in Word 2003 I get 8 - the
expected value.
It seems like the Font.ColorIndex property "likes" the value 7 for
almost any font color that isn't part of the WdColorIndex set. That
would be fine if 7 was "undefined" but 7 is wdYellow.
I realize Word 2007 is much more "RGB" dependent but the ColorIndex
still shouldn't be wrong.
1. Create some text - change the font color to white via the Word font
2007 UI
2. Select the Text
3. Goto VBA and in the Immediate Windows type ?
Selection.Range.Font.ColorIndex
I'm getting the value of 7 which is the colorindex value wdYellow
instead of 8 - wdWhite.
4. If I do the very same repro steps in Word 2003 I get 8 - the
expected value.
It seems like the Font.ColorIndex property "likes" the value 7 for
almost any font color that isn't part of the WdColorIndex set. That
would be fine if 7 was "undefined" but 7 is wdYellow.
I realize Word 2007 is much more "RGB" dependent but the ColorIndex
still shouldn't be wrong.