Created
June 8, 2022 08:59
-
-
Save bjoerntx/65438442770749b426671c6c325cc0bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create a data object | |
var dummyData = new Report() { | |
Company = "Text Control, LLC", | |
Website = new Hyperlink() { | |
Text = "Visit us", | |
Target = "https://www.textcontrol.com" | |
} | |
}; | |
// merge using MailMerge | |
using (TXTextControl.DocumentServer.MailMerge mm = | |
new TXTextControl.DocumentServer.MailMerge() { TextComponent = textControl1 }) { | |
// magic happens in the FieldMerged event | |
mm.FieldMerged += Mm_FieldMerged; | |
mm.MergeObject(dummyData); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment