Merging two or more WPT's together

  • What is the best method to merge them together?

    I tried

    Code
    par := SourceDok.FirstPar;
            while assigned(par) do begin
                // Append it to the active RTFDataBlock
                DestDok.ActiveText.AppendParCopy(par);
                // This moves to the next paragraph! Useful in a loop!
            end;

    but then some style and formatting are not copied correctly ...

  • i tried following :

    But still no formating ...

  • oh, i see the problem .....

    the second WP ist generated with a mailmerge ...

    Code
    Contents.StringValue := temp; // temp is a really big WPT Text with Formated things, styles and more ...

    Can this be the problem?

  • I changed my code so that all editors now use the event.

    But i think the problem is the mailmerge, not the merging of two editors ....

    I have a big WPT Text (a document) which i mailmerge into an other document.

    Can the mailmerge handle whole WPT Document to be inserted?

  • thanks for the additional help, but it still will not work :(

    I think i have found why it doesn't work, but don't know how to fix ...

    I have replaced the Mailmerge with your @INSERT@ method, after this the document seems to be ok.

    But if i merge the two documents (After the mail merge) together with the AppendParCopy function
    The resulting document is missing the "numberstyles" section
    And therefore the numbering is wrong.[/code]


    ..... habs nun statt AppendParCopy, einfach ein Finder.ToEnd; und dann LoadFromString gemacht, nun passt es ....

    Danke für die Hinweise ...