Working with Rich Text Format

G

Guest

I plan to write a form that uses the Rich Textbox control. Can anyone advise
me the best way to get the formatted text from the control into an excel
worksheet cell, keeping as much of the formatting as possible?

I'd like to avoid using the clip board if that's possible.

Additionally is there a simple way to strip out all the rich text tags from
a rich string leaving only the text?

cheers,

Rm
 
T

Tom Ogilvy

I think your work around would be to get the documentation on RTF codes and
write code to interpret them. then you could place the text string in the
cell and have you code format it based on the interpretation of the RTF
codes. Sounds like a lot of work.
 
G

Guest

Thanks Tom, that's pretty much the conclusion that I've reached too.

I had a bit of a play with writting some code that does exactly that; and
yes it is a lot of work. Do you happen to know of a site when I can get a
description of the RTF syntax?

I've worked some of it out typeing in a rich textbox and looking at the
resulting string. For example I know

{\colortbl ;\red255\green0\blue0;} \cf1

is used to define the colours of text, and I can bold, underline and strike.
I can't be sure what I'm missing. If i'm going to go to all the effort of
creating this thing I want to know I've covered as much of the formats
potential as possible.


- Rm
 
G

Guest

Thanks again, Tom.

I'll repost in this forum if I come-up with anything worth while.


- Rm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top