WPRichText.AsString := string doesn't recover headers?

  • I'm saving the contents of a richtext in a database using the following code:

    Code
    document := WPRichText.AsANSIString('WPTOOLS', false)

    When i'm trying to recover the saved data using:

    Code
    WPRichTest.AsString := document

    the bodytext shows up perfect but my headers and footers are gone?!
    However in the 'document'-string i can see the header and footer information.
    Can i recover this data without having to save the headers and footers apart from the bodytext (and thus creating them again with WPRichText.HeaderFooter.Get())?

    • Offizieller Beitrag

    Hi,

    thetre most be something else going wrong - please try

    WPRichTest.AsString :=
    WPRichText.AsANSIString('WPTOOLS', false)

    that should work perfectly. Maybe your string was truncated by the database. In this case use


    WPRichText.AsANSIString('WPTOOLS-nobinary', false)