>Q1: How can I change the background color of a selected piece of text in the Rich Text control. The online documentation says that the "\cb" RTF code should do the trick but I had no luck (although its partner "\cf" DOES work for changing the forecolor) I looked at the RTF codes generate by Word when saving a document as RTF. It used the "\highlight" code but the RTF control seems to ignore this RTF code.
Through automation with word, you can select a block of text. This in turn creates a Selection object - which is a member of the Word Application Object.
Something like
With oWord.Selection.Font
With .Shading
.Texture = wdTextureNone
.ForegroundPatternColorIndex = wdAuto
.BackgroundPatternColorIndex = wdRed
End With
End With
wdRed = 6
wdAuto = 0
>
>Q2: Where can I get a list of RTF codes and examples of how to use them? (The list given with the Rich Text Control, version 6 isn't very helpful.
Check out the following link:
http://premium.microsoft.com/msdn/library/specs/f15/d11/s6cd3.htmFWIW, I would suggest using HTML over RTF....