• Hi,

    I use WPPreview to have a preview of my DBWPRichText component for mailmerge.
    So, I linked my preview component to my richtext component.
    I added some mergefields to my richtext and i have created a button to get a preview.

    Now everything works fine but the DBWPRichtext shall also merge my mergefields and not only my preview.
    That is understandable because a preview is linked to a richtext and you have to this : wprichtext.mailmerge().

    But, is there a way to do the merging only in the preview ?
    When i'm doing my preview i need the unmerged text as well and on my preview only the merged text.

    I'm using delphi 7 with WPtools 6.

    gr Hans

    • Offizieller Beitrag

    Hi,

    please note that a TWPPreview is like a TWPRichText without an attached document text. You can create a preview (readonly text) using a TWPRichText directly.

    In your case I see the follwing possibilities.

    a) make the DBWPRichText readonly (also see EditOptions) to have a preview
    b) don't use a DBWPRichText but a TWPRichText. Assign Field.AsString to WPRichText.ASString in even OnDataset.OnScroll. Now wou see the text in the editor changing as You scroll through the dataset.

    From Your description I assume you need the DBWPRichText to see the unmerged text and a readonly TWPRichText to merge and preview the merged text. YOu would not need the TWPPreview.

    Julian