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

Ask a Question related to ASP, Design and Development.

  1. #1

    Default 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


    Alfredo Agosti Guest

  2. Similar Questions and Discussions

    1. Postgresql Text field / Visual FoxPro Memo and ODBC
      On Wed, 2005-01-12 at 14:59, MargaretGillon@chromalloy.com wrote: Postgresql doesn't support updatable cursors. ---------------------------(end...
    2. Saving long text in a memo field
      Sajid wrote: I've never run across this situation. My first suggestion would be to switch from ODBC to OLEDB. Here is a sample connection string...
    3. Missing text sections in layout printed to plain text
      Hi - I am printing out one long text inserted (pasted) in a textbox in one body section which spans multiple pages. Within this text (source...
    4. eruby: content-type is text/plain
      Hi, I habe found some eruby-scripts and wanted to test them. So i installed mod_ruby and eruby and the scripts work. But there is one annoying...
    5. losing text in memo field when double-spacing
      Hi, I'm working in Access 2000 with a db that has a lot of text. When I change the line spacing to .1" (properties box, format tab) in memo...
  3. #2

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

    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:
    [url]http://www.aspfaq.com/2395[/url]



    "Alfredo Agosti" <james_milanNOSPAM@hotmail.com> wrote in message
    news:bkf6fk$13kur$1@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
    >
    >

    Aaron Bertrand - MVP Guest

  4. #3

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

    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" <aaron@TRASHaspfaq.com> wrote in message
    news:ef5qmRsfDHA.1832@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:
    > [url]http://www.aspfaq.com/2395[/url]
    >
    >
    >
    > "Alfredo Agosti" <james_milanNOSPAM@hotmail.com> wrote in message
    > news:bkf6fk$13kur$1@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
    > >
    > >
    >
    >

    Alfredo Agosti Guest

  5. #4

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

    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" <james_milanNOSPAM@hotmail.com> wrote in message
    news:bkf97g$121fs$1@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" <aaron@TRASHaspfaq.com> wrote in message
    > news:ef5qmRsfDHA.1832@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:
    > > [url]http://www.aspfaq.com/2395[/url]
    > >
    > >
    > >
    > > "Alfredo Agosti" <james_milanNOSPAM@hotmail.com> wrote in message
    > > news:bkf6fk$13kur$1@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
    > > >
    > > >
    > >
    > >
    >
    >

    Aaron Bertrand - MVP Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139