Problem with merging RTF fields

  • Hi all,

    I've been having a problem with merging rtf fields. Usually, it works great, but when the mergefield is preceded by wrapped lines of text things go awry.

    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<Mergefield here>
    (I hope this wraps when I posted it, it doesn't do that in the editor.)


    merges into
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<rtf text inserted here>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    An example of the text that I merge into the x's is:
    {\rtf1\ansi\deff0 Silhouette portrait on the title page, as Forbes suggests of Cook, but probably of Zimmermann. Woodcut head- and endpiece.\par }
    When I remove the ending \par, the result is no different.


    Thanks,
    Bas

  • Am I to understand that version 3 would handle this properly?
    Is version 3 still available?

    Will this bug be removed in version 5?
    When will that be available?

    Is there any way to circumvent this problem in version 4? I'm willing to consider drastic measures, as this particular problem makes WPReporter useless for a large part of my customers (and therefore for me)

    Regards,
    Bas

    • Offizieller Beitrag

    Hi,

    >>Am I to understand that version 3 would handle this properly?
    Is version 3 still available? <<
    Yes.

    >>Will this bug be removed in version 5?
    Version 5 does not have this problem at all since it handles the paragraphs as one piece and not at a list of lines. It creates also very compact RTF code.

    >>When will that be available?
    In about 4 weeks

    >>Is there any way to circumvent this problem in version 4?
    I think so. The properties are written by
    function TWPRTFWriter.WriteAttributes: ecErrCode;
    in unit WPWrtRTF.
    if (save_pos=0) and (afsAutomatic in save_pa^.style) the
    begin
    Result := ecOK;
    exit;
    end;

    in the beginning should help.

    Julian Ziersch