ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Working with Rich Text Format (https://www.excelbanter.com/excel-programming/342423-working-rich-text-format.html)

Robert Mulroney[_3_]

Working with Rich Text Format
 

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



Robert Mulroney[_3_]

Working with Rich Text Format
 

Ah,

http://support.microsoft.com/default...b;en-us;213693

Anyone got a work around?

- Rm


"Robert Mulroney" wrote:


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



Tom Ogilvy

Working with Rich Text Format
 
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.

--
Regards,
Tom Ogilvy


"Robert Mulroney" '''' wrote in message
...

Ah,

http://support.microsoft.com/default...b;en-us;213693

Anyone got a work around?

- Rm


"Robert Mulroney" wrote:


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





Robert Mulroney[_3_]

Working with Rich Text Format
 

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



"Tom Ogilvy" wrote:

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.

--
Regards,
Tom Ogilvy


"Robert Mulroney" '''' wrote in message
...

Ah,

http://support.microsoft.com/default...b;en-us;213693

Anyone got a work around?

- Rm


"Robert Mulroney" wrote:


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






Tom Ogilvy

Working with Rich Text Format
 
http://support.microsoft.com/kb/q269575/
WD: Rich Text Format (RTF) Specification Version 1.7 Available

--
Regards,
Tom Ogilvy


"Robert Mulroney" '''' wrote in message
...

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



"Tom Ogilvy" wrote:

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.

--
Regards,
Tom Ogilvy


"Robert Mulroney" '''' wrote in message
...

Ah,

http://support.microsoft.com/default...b;en-us;213693

Anyone got a work around?

- Rm


"Robert Mulroney" wrote:


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








Robert Mulroney[_3_]

Working with Rich Text Format
 

Thanks again, Tom.

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


- Rm


"Tom Ogilvy" wrote:

http://support.microsoft.com/kb/q269575/
WD: Rich Text Format (RTF) Specification Version 1.7 Available

--
Regards,
Tom Ogilvy


"Robert Mulroney" '''' wrote in message
...

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



"Tom Ogilvy" wrote:

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.

--
Regards,
Tom Ogilvy


"Robert Mulroney" '''' wrote in message
...

Ah,

http://support.microsoft.com/default...b;en-us;213693

Anyone got a work around?

- Rm


"Robert Mulroney" wrote:


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










All times are GMT +1. The time now is 12:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com