Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created June 8, 2023 12:35
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/da6f02e8d509b1aa8c72e0d62d7159bc to your computer and use it in GitHub Desktop.
Save bjoerntx/da6f02e8d509b1aa8c72e0d62d7159bc to your computer and use it in GitHub Desktop.
string jsonData = System.IO.File.ReadAllText("data.json");
textControl1.Load("template.tx", TXTextControl.StreamType.InternalUnicodeFormat);
using (MailMerge mailMerge = new MailMerge()) {
mailMerge.TextComponent = textControl1;
mailMerge.MergeJsonData(jsonData);
}
foreach(TXTextControl.Table table in textControl1.Tables) {
table.RemoveEmptyColumns();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment