The information in this article applies to:
SUMMARY
The Microsoft WordBasic CharColor statement sets the character color of the
selection to the color specified in the Color argument. The CharColor()
function returns the color of the selected text.
MORE INFORMATIONWARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. CharColor SyntaxCharColor <Color>The color argument is a numeric code for one of the following character colors supported in Word 2.0 and 6.0 for Windows:
The function form of CharColor returns the same number codes set by the
CharColor statement or the value -1 if all the selected text is not the
same color. Below is an example of the function form of CharColor:
The following macro inserts the word "Color" formatted for each of the 16
colors available using the CharColor command in Word version 2.0 and 6.0
for Windows:
The CharColor command under Word for Windows versions 1.x supports eight
character colors, as outlined below:
The following sample macro inserts the word "Color" formatted for each of
the 8 colors available using the CharColor command in Word for Windows
versions 1.x:
REFERENCES
"Using WordBasic," by WexTech Systems and Microsoft, pages 159-160
Additional query words: charcolor character color
Keywords : kbmacro wordnt kbmacroexample winword ntword macword word6 winword2 word7 word95 |
Last Reviewed: October 4, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |