![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi I have a Text Box of which the Text Format is set to Rich Text. The box is filled with texts containig certain elements that are surrounded by brackets. Those elements I would like to appear in a different color. I have no experience (apart from some experimenting) with Rich Text, so I don't even know if it is possible to colour several, different parts. And then of course: How? Any help appreciated! Michiel --- news://freenews.netfront.net/ - complaints: news (AT) netfront (DOT) net --- |
#3
| |||
| |||
|
|
Presumably this is Access 2007. You can select the text, and then use the ribbon to set the text color. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Michiel Rapati-Kekkonen" <no-mail (AT) nonsense (DOT) zz> wrote in message news:hoipe1$1ebk$1 (AT) adenine (DOT) netfront.net... Hi I have a Text Box of which the Text Format is set to Rich Text. The box is filled with texts containig certain elements that are surrounded by brackets. Those elements I would like to appear in a different color. I have no experience (apart from some experimenting) with Rich Text, so I don't even know if it is possible to colour several, different parts. And then of course: How? Any help appreciated! Michiel --- news://freenews.netfront.net/ - complaints: news (AT) netfront (DOT) net --- |
#4
| |||
| |||
|
|
Thanks for your response, Allen, at least now I see Something happen, but I would like to do it programmatically. So far I can select, by code, the parts I want, but when I then apply ' .SelColor = vbRed ' the error message is 438: Object doesn't support this property or method. It is an unbound texbox, Enabled, Unlocked, with Text format set to Rich. I'm using 2007 indeed. The question remains: is it possible? Michiel |
#5
| |||
| |||
|
|
Insert the HTML word around the desired text, e.g.: Me.MyRichTextField = "This has a <font color=""#FF0000"">red</font> word." You may need to use SelStart, Len(), Mid() etc to code this. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Michiel Rapati-Kekkonen" <no-mail (AT) nonsense (DOT) zz> wrote in message news:hokagn$10pp$1 (AT) adenine (DOT) netfront.net... Thanks for your response, Allen, at least now I see Something happen, but I would like to do it programmatically. So far I can select, by code, the parts I want, but when I then apply ' .SelColor = vbRed ' the error message is 438: Object doesn't support this property or method. It is an unbound texbox, Enabled, Unlocked, with Text format set to Rich. I'm using 2007 indeed. The question remains: is it possible? Michiel |
![]() |
| Thread Tools | |
| Display Modes | |
| |