Mail Merge Example

4 posts, 0 answers
  1. homer
    homer avatar
    3 posts
    Member since:
    Feb 2012

    Posted 23 Feb 2012 Link to this post

    Hi.  I am looking for an example that would allow me to programatially perform a mail merge and display the merged output in the RadRichTextBox.  The merge template was created in the RadRichTextEditor and all the data is available for the datasource. Is this possible to do ?  I am currently using the Rad Controls for Silverlight 4 but will soon be upgrading to the version for Silverlight 5.

    Thanks a lot.
  2. Iva Toteva
    Iva Toteva avatar
    1319 posts

    Posted 29 Feb 2012 Link to this post

    Hi O'Neill,

    There is no difference between the way mail merge works in Silverlight 4 and Silverlight 5. With both versions, you can perform programmatic mail merge and show the resulting document in RadRichTextBox in the following way:
    this.editor.Document = document.MailMerge();

    The prerequisites is that the mail-merge document used as template is contained in the "document" variable (it can also be the document in the editor, i.e. this.editor.Document) and that the mail merge data source of document is set.

    I hope this helps.

    All the best,
    Iva Toteva
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. homer
    homer avatar
    3 posts
    Member since:
    Feb 2012

    Posted 17 May 2012 Link to this post

    Thanks.  The above example worked great.  I am attempting to make a mailing label screen.  I tried to test a merge with multiple data records and the merge produced a new label per record but displayed the same data in each record.  What did I miss that would allow the merge to itterate the dataset I am passing ?

    As well, is it possible to set up a table or grid or something that would create two columns on the page and multiple rows to deliniate and contain each label so that there are lines to use to cut the lables out when they are printed ?

    Thanks for your help.
  4. Boby
    Boby avatar
    763 posts

    Posted 22 May 2012 Link to this post

    Hello D,
    MailMerge method produce document containing documents with merge fields replaced with corresponding data source items.
    Please refer to this forum thread for more information on how to create custom master-details mail merge fields.

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top