Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created June 8, 2022 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/65438442770749b426671c6c325cc0bc to your computer and use it in GitHub Desktop.
Save bjoerntx/65438442770749b426671c6c325cc0bc to your computer and use it in GitHub Desktop.
// 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