Some document formats lost on LoadFromString

  • Hi folks,

    If I load a RTF document using LoadFromFile, all formats and document margins are respected. Then, I use SaveToString in order to store the document to a database. Then, if I try to load the string using LoadFromString, the document margins (among other things) do not match those of the original document. What steps am I missing to ensure a complete match?

    Thanks!

  • Thanks for your reply. Specifically, this is what is happening:

    With WPDLLInt1.Memo
    .LoadFromFile "C:\TestTemplate.rtf", True, "" 'Initial load

    'The template is then documented with data and is saved as a string.
    rtfWPString = .SaveToString(False, "WPT")

    'Then the string is saved to the database. If the user later wants to
    'display the document, the following is done:
    .Clear False, False
    .LoadFromString rtfWPString, True, "WPT"
    end with

    However, when this is done, the margins of the original document are not respected. Am I forgetting something, consequently preventing the margin data from being saved in the string?

    Thanks!