Bullets lost after merging

  • Hi:

    I've just upgraded to WPTool 7 and am now converting the memo in our database from plain text to RTF using TWPRichText. If I create text with bullets or numbered lists, and then merge them into a document, the lists are merged as just text (no bullets or numbers).

    Any ideas on how I can fix this?

    Thanks,

    Dale

  • Yes, the bold, italics and underline come in fine. I am building a simple sample project to see if I can get it to work without all of the distractions of my main application. I will let you know how it goes.

    Dale

  • I think I've found the problem. The issue was with .FastAppendText and not with the actual merge itself. I called .FastAppendText to append each new merged paged to another document and that is where the bullets got stripped off.

    I used the solution below but I'm also going try sharing the RTFProps too, if I can figure out how to make that work.

  • As a follow up in case anyone else is interested in my solution. When using the code above, the merged RTF text would get merged correctly, however if the original merge template contained any bullets, they would be lost.

    I dropped an TWPRTFProps component on the main form, and then assigned it to each of the TWPRichTexts (TWPRichText.WPRTFPropsCompoent) in the application and that seemed to be the best solution.

    • Offizieller Beitrag

    It is documented that FastAppendText requires RTFProps to be the shared. Any tables, colors, fonts, styles etc are just copied.

    The MailM4 demo shows an example how to create a shared RTFProps object:

    var RTFDataProps : TWPRTFProps;

    procedure TForm1.WPRichText1InitializeRTFDataObject(Sender: TObject;
    var RTFDataObject: TWPRTFDataCollection;
    var RTFPropsObject: TWPRTFProps);
    begin
    if RTFDataProps=nil then RTFDataProps := TWPRTFProps.Create;
    RTFPropsObject := RTFDataProps;
    RTFPropsObject.Locked := TRUE;
    end;