Mailmerge

[Top]  [Chapter]  [Previous]  [Next]

The mail merge process offered by TextDynamic is one of its most popular features.

 

To use the mail merge feature you only need to

 

a) insert fields

       Method: TextCursor.InputField

b) create callback which fills in data

       Event: OnFieldGetText

c) start the merge process

       Method: Memo.MergeText

 

You can use Memo.MergeText each time the data which should be inserted has been updated. So it is easy to create a viewing form for database records. The previous contents of the field will be updated. The field  is not destroyed by the merge process, such as it is in the usual search&replace approach.

 

With TextDynamic you can also read out the text inside of a field when the event OnFieldGetText is triggered. So you can also create a database input form.

       

If you want to do mass mailing you can execute MergeText and append the merged text to a different, internal text buffer. Please see our create list and label printing demo which show how to use this powerful feature.

 

Technical note:

 

Like hyperlinks merge fields use paired objects. One object marks the start of the field, the other the end. The text within is the "embedded text". You can customize the component to show or hide the fieldmarkers (SpecialTextAttr(wpInsertpoints).Hidden). It is also possible to display a single object only which shows the name of the field. (property IWPMemo.ShowFields)

 


[mailmerge.htm]    Copyright © 2007 by WPCubed GmbH