Results 1 to 3 of 3
  1. #1
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Extract Plain Text from RTF (Access 2003)

    In <post#=454735>post 454735</post#> Hans showed how to use the Text property of a Rich Text control to extract just the text from a memo field holding rtf.

    I would like to be able to do the same job with a query.

    If I have a memo field holding text containing rtf. I would like to be able, in some cases, to be able to display the field as plain text.
    (An example is within a treeview control where I can't put a rich text control.)

    Either I store two versions of it, or I find a function that I can use in a query that will return just the plain text .
    Regards
    John



  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Extract Plain Text from RTF (Access 2003)

    Unless you fancy writing your own converter, it seems from a quick newsgroup scan that a function that uses a Rich TextBox control is the way to go, but that would be painfully slow if you try to use it in a query. I think that storing a plain text version in the table is mandatory for performance reasons, even if it is not "good design".

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Extract Plain Text from RTF (Access 2003)

    Thanks Hans.

    I thought this would be the case.

    I think I might abandon my plan of using rtf, and stick to plain text. I think it is more trouble than it is worth.
    Regards
    John



Posting Permissions

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