472,102 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,102 software developers and data experts.

Content from a memo field: converting the rich text into plain text

Hi folks,
I have an Access 2000 db with a memo field.
Into the memo field I put text with bold attributes, URL etc etc

What I need to to is converting the rich text contained into the memo
field in plain text.
That's because I truncate the string text but if, when I truncate it
there's a rich tag the code following the truncated string is corrupted.

Don't know if it's clear enough.

Just to summarize:

1) memo field cointaining rich text
2) I need to transform it in plain text

Thanks in advance
Paolo
Jul 19 '05 #1
3 8440
ASP doesn't know what "rich text" is. All that's stored in the database is
a big string.

Maybe some of the following could help:
http://www.aspfaq.com/2395

"Alfredo Agosti" <ja***************@hotmail.com> wrote in message
news:bk************@ID-83500.news.uni-berlin.de...
Hi folks,
I have an Access 2000 db with a memo field.
Into the memo field I put text with bold attributes, URL etc etc

What I need to to is converting the rich text contained into the memo
field in plain text.
That's because I truncate the string text but if, when I truncate it
there's a rich tag the code following the truncated string is corrupted.

Don't know if it's clear enough.

Just to summarize:

1) memo field cointaining rich text
2) I need to transform it in plain text

Thanks in advance
Paolo

Jul 19 '05 #2
Thanks but it couldn't help.
I need exactly the opposite.
I have formatted (rich text or rtf text I don't know) text and I would
convert it into plain text.

But a text field can't contain bold reference so it must exist a way to
strip the formatting codes from a memo field...

James

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:ef**************@TK2MSFTNGP09.phx.gbl...
ASP doesn't know what "rich text" is. All that's stored in the database is a big string.

Maybe some of the following could help:
http://www.aspfaq.com/2395

"Alfredo Agosti" <ja***************@hotmail.com> wrote in message
news:bk************@ID-83500.news.uni-berlin.de...
Hi folks,
I have an Access 2000 db with a memo field.
Into the memo field I put text with bold attributes, URL etc etc

What I need to to is converting the rich text contained into the memo field in plain text.
That's because I truncate the string text but if, when I truncate it
there's a rich tag the code following the truncated string is corrupted.
Don't know if it's clear enough.

Just to summarize:

1) memo field cointaining rich text
2) I need to transform it in plain text

Thanks in advance
Paolo


Jul 19 '05 #3
You could either (a) strip the references before storing them in the first
place; (b) write a script that will remove the references from the database;
or (c) use server.HTMLEncode() if you mean HTML and not rtf.


"Alfredo Agosti" <ja***************@hotmail.com> wrote in message
news:bk************@ID-83500.news.uni-berlin.de...
Thanks but it couldn't help.
I need exactly the opposite.
I have formatted (rich text or rtf text I don't know) text and I would
convert it into plain text.

But a text field can't contain bold reference so it must exist a way to
strip the formatting codes from a memo field...

James

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:ef**************@TK2MSFTNGP09.phx.gbl...
ASP doesn't know what "rich text" is. All that's stored in the

database is
a big string.

Maybe some of the following could help:
http://www.aspfaq.com/2395

"Alfredo Agosti" <ja***************@hotmail.com> wrote in message
news:bk************@ID-83500.news.uni-berlin.de...
Hi folks,
I have an Access 2000 db with a memo field.
Into the memo field I put text with bold attributes, URL etc etc

What I need to to is converting the rich text contained into the memo field in plain text.
That's because I truncate the string text but if, when I truncate it
there's a rich tag the code following the truncated string is corrupted.
Don't know if it's clear enough.

Just to summarize:

1) memo field cointaining rich text
2) I need to transform it in plain text

Thanks in advance
Paolo



Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by John | last post: by
7 posts views Thread by anthony | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.