Solved

RTF code for highlighting text

Posted on 2007-11-30
3
263 Views
Last Modified: 2012-05-05
What is the RTF code for highlighting text? (i.e it's background color)

In the case of specifying text foreground colors, the color code needs to be declared in a color table at the head of the file. Then to specify the foreground text colour I would use the following RTF code:

\\cf3

.. where the 3 indicates the color index in the color table. My first question is what is the RTF code for specifying a highlighted block? what would go in place of \\cf?? .. and secondly and it would be logical, is the highlighting colour specifyed by putting an entry into the colour table and then referencing it as is done in the case of foreground colors?
0
Comment
Question by:paddycobbett
  • 2
3 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 20385988
0
 
LVL 1

Author Comment

by:paddycobbett
ID: 20386174
Thanks, i had seen that link as it so happens.. but it seems to suggest that text can only be highlighted using 1 of only 16 colors? Is that really the case, and any obvious reason why it is restricted as such??
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 20386342
In Word, there are fifteen colours in the Highlight selection palette, plus 'None', so that corresponds.

However, also in Word, you can achieve a similar effect, but with more colours, using character shading.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to count occurrences of each item in an array.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now